UNPKG

msw

Version:

Seamless REST/GraphQL API mocking library for browser and Node.js.

15 lines (11 loc) • 314 B
import { HttpHandler } from '#http/http-handler' import { sse } from './index' beforeAll(() => { vi.stubGlobal('EventSource', class EventSource {}) }) afterAll(() => { vi.unstubAllGlobals() }) test('exposes the sse request handler', () => { expect(sse('/stream', () => {})).toBeInstanceOf(HttpHandler) })