diff --git a/app/package.json b/app/package.json index c672210c..55b793c2 100644 --- a/app/package.json +++ b/app/package.json @@ -30,6 +30,7 @@ "@quilted/graphql": "^3.3.7", "@quilted/graphql-tools": "^0.2.11", "@quilted/localize": "^0.2.1", + "@quilted/preact-testing": "^0.1.7", "@quilted/quilt": "^0.8.1", "@remote-dom/core": "^1.5.0", "@remote-dom/preact": "^1.2.0", diff --git a/app/tests/render.ts b/app/tests/render.ts index 552982f7..81683c6b 100644 --- a/app/tests/render.ts +++ b/app/tests/render.ts @@ -1,6 +1,14 @@ -import '@quilted/quilt/testing'; +import {expect} from 'vitest'; +import {matchers, type CustomMatchers} from '@quilted/preact-testing/matchers'; export {TestRouter} from '@quilted/quilt/navigation/testing'; export * from './render/types.ts'; export {renderApp} from './render/render.tsx'; + +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} + +expect.extend(matchers); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ddf10f08..00f26ca4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -156,6 +156,9 @@ importers: '@quilted/localize': specifier: ^0.2.1 version: 0.2.1 + '@quilted/preact-testing': + specifier: ^0.1.7 + version: 0.1.7(preact@10.23.2) '@quilted/quilt': specifier: ^0.8.1 version: 0.8.1(@preact/signals-core@1.8.0)(@quilted/react@18.2.5)(graphql@16.8.1)(preact@10.23.2)(prettier@3.1.0)(vitest@2.0.5(@types/node@20.10.1)(jsdom@25.0.0)(lightningcss@1.22.1)(terser@5.15.1))