Security News
Internet Archive Hacked, 31 Million Record Compromised
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
angular-ws-mock
Advanced tools
Mock for AngularJS WebSocket service.
bower install angular-ws-mock
describe('My service', function () {
var ws, myService;
beforeEach(module('app', 'wsMock'));
beforeEach(inject(function ($injector) {
ws = $injector.get('ws');
myService = $injector.get('myService');
}));
it('should connect to the WebSocket', function () {
ws.emit('open');
expect(ws.getReadyState()).to.equal(1);
});
Emit a new event.
ws.emit('message', {data: 'my message'});
Read the messages sent.
ws.send('hello')
console.log(ws.messages); // ['hello']
Empty messages.
ws.send('hello')
console.log(ws.messages); // ['hello']
ws.reset();
console.log(ws.messages); // []
MIT
FAQs
Mock for AngularJS WebSocket service.
The npm package angular-ws-mock receives a total of 1 weekly downloads. As such, angular-ws-mock popularity was classified as not popular.
We found that angular-ws-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
Security News
TC39 is meeting in Tokyo this week and they have approved nearly a dozen proposals to advance to the next stages.
Security News
Our threat research team breaks down two malicious npm packages designed to exploit developer trust, steal your data, and destroy data on your machine.