How to use the jest-websocket-mock.WS function in jest-websocket-mock

To help you get started, we’ve selected a few jest-websocket-mock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pikax / vue-composable / packages / web / __tests__ / misc / webSocket.spec.ts View on Github external
beforeEach(() => {
    server = new WS(FAKE_URL);
    warnSpy.mockReset();
  });

jest-websocket-mock

Mock websockets and assert complex websocket interactions with Jest

MIT
Latest version published 9 months ago

Package Health Score

72 / 100
Full package analysis

Popular jest-websocket-mock functions