@hazejs/testing
v1.1.0
Published
Vitest helpers for hazejs: test app, HTTP client, actingAs and fakes
Maintainers
Readme
@hazejs/testing
Vitest integration for hazejs: test app, HTTP client, actingAs() and database helpers.
Install
pnpm add -D @hazejs/testingUsage
const t = useTestApp()
it('lists posts', async () => {
const res = await (await t.actingAs(user)).get('/api/posts')
expect(res.status).toBe(200)
})Part of hazejs — see the main README for documentation.
