BUPKIS
    Preparing search index...

    Module @bupkis/msw

    MSW request verification assertions for Bupkis.

    See also: README

    import { use } from 'bupkis';
    import mswAssertions, { createTrackedServer } from '@bupkis/msw';
    import { http, HttpResponse } from 'msw';

    const { expect } = use(mswAssertions);

    {
    using server = createTrackedServer(
    http.get('/api/users', () => HttpResponse.json([])),
    );

    server.listen();
    await fetch('http://localhost/api/users');
    expect(server, 'to have handled request to', '/api/users');
    // server.close() called automatically
    }

    Tracked Server

    Factory, types, and utilities for MSW servers with request tracking.

    createTrackedServer
    isTrackedServer
    waitForBodies
    RequestMatchOptions
    TrackedRequest
    TrackedServer