@dudousxd/nestjs-inertia-testing
pnpm add -D @dudousxd/nestjs-inertia-testingDrop-in test utilities for Vitest, Jest, and Node’s built-in test runner.
Key API surface
Section titled “Key API surface”| Export | Description |
|---|---|
expectInertia(response) | Fluent assertion chain from a supertest response |
assertInertia(payload) | Fluent assertion chain from a raw JSON payload |
InertiaTestingModule | Pre-configured NestJS testing module |
createFakeInertiaRequest(opts) | Creates a fake req.inertia for unit tests |
expectInertiaRequest(req) | Assertion chain against a fake request |
See Testing guide for full examples.
Register matchers
Section titled “Register matchers”import '@dudousxd/nestjs-inertia-testing/vitest';