Packages
    Preparing search index...

    Module @mcansh/vitest-response-matchers

    @mcansh/vitest-response-matchers

    Response assertion matchers for vitest

    expect(new Response("Hello, world!", { status: 200 })).toHaveStatus(200);

    expect(new Response(null, { status: 200, statusText: "OK" })).toHaveStatusText(
    "OK",
    );

    expect(
    new Response("Hello, world!", {
    status: 200,
    statusText: "Not OK",
    }),
    ).toHaveStrictStatusText();

    expect(new Response(null, { status: 200, statusText: "OK" })).toMatchResponse({
    status: 200,
    statusText: "OK",
    });

    expect(() => {
    throw new Response("Not Found", { status: 404 });
    }).toThrowResponse(new Response("Not Found", { status: 404 }));

    Modules

    client
    index
    matchers
    matchers/to-have-body
    matchers/to-have-cookies
    matchers/to-have-header
    matchers/to-have-json-body
    matchers/to-have-status
    matchers/to-have-status-text
    matchers/to-have-strict-status-text
    matchers/to-have-text-body
    matchers/to-match-response
    matchers/to-throw-response
    matchers/types
    utils