Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ng-test-runner
Advanced tools
[![Build Status](https://travis-ci.org/Pragmatists/ng-test-runner.svg?branch=master)](https://travis-ci.org/Pragmatists/ng-test-runner) [![npm version](https://badge.fury.io/js/ng-test-runner.svg)](https://badge.fury.io/js/ng-test-runner) [![Coverage Stat
To install it, type:
$ npm install ng-test-runner --save-dev
Following example presents tests for simple counter component.
import test, {App, click, expectThat, http, Server} from "ng-test-runner";
import {CounterComponent, CounterModule} from './counter';
describe('Counter Component', () => {
let app: App, server: Server;
beforeEach(() => {
app = test(CounterModule);
server = http();
});
it('should render counter initial value', () => {
const comp = app.run(CounterComponent, {value: 5}); // => <counter [value]="5"></counter>
comp.verify(
expectThat.textOf('.counter').isEqualTo('5')
);
});
it('should increment counter value by 1', () => {
const comp = app.run(CounterComponent, {value: 0});
comp.perform(
click.in('button.increment')
);
comp.verify(
expectThat.textOf('.counter').isEqualTo('1')
);
});
it('should send incrementation request to server', () => {
const comp = app.run(CounterComponent, {value: 0});
let jsonSentToServer;
server.post('/counter/increment', req => {
jsonSentToServer = req.body();
req.sendStatus(200);
});
comp.perform(
click.in('button.increment')
);
comp.verify(
() => expect(jsonSentToServer).toEqual({counter: 1})
);
});
});
FAQs
[![Build Status](https://travis-ci.org/Pragmatists/ng-test-runner.svg?branch=master)](https://travis-ci.org/Pragmatists/ng-test-runner) [![npm version](https://badge.fury.io/js/ng-test-runner.svg)](https://badge.fury.io/js/ng-test-runner) [![Coverage Stat
We found that ng-test-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.