From 8da92cd5c2348b5bc248090544b83a9f4f6a4ce0 Mon Sep 17 00:00:00 2001 From: David Osolkowski Date: Tue, 22 Oct 2024 11:19:50 -0400 Subject: [PATCH] Switch to different module, fixing the bug --- app/package.json | 1 + app/src/custom-matchers.d.ts | 4 ++-- pnpm-lock.yaml | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index 828c3f0..7e185f4 100644 --- a/app/package.json +++ b/app/package.json @@ -19,6 +19,7 @@ "@types/react": "^18.3.11", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react-swc": "^3.7.1", + "@vitest/expect": "^2.1.3", "jsdom": "^25.0.1", "typescript": "^5.6.3", "vite": "^5.4.9", diff --git a/app/src/custom-matchers.d.ts b/app/src/custom-matchers.d.ts index ad4c0ef..3d59a69 100644 --- a/app/src/custom-matchers.d.ts +++ b/app/src/custom-matchers.d.ts @@ -1,7 +1,7 @@ -import "vitest"; +import "@vitest/expect"; import type { AxeMatchers } from "vitest-axe"; -declare module "vitest" { +declare module "@vitest/expect" { // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-empty-object-type -- have to match interface we're altering interface Assertion extends AxeMatchers {} // eslint-disable-next-line @typescript-eslint/no-empty-object-type diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 21cefcf..bf6f3a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,6 +123,9 @@ importers: '@vitejs/plugin-react-swc': specifier: ^3.7.1 version: 3.7.1(vite@5.4.9(@types/node@20.16.14)) + '@vitest/expect': + specifier: ^2.1.3 + version: 2.1.3 jsdom: specifier: ^25.0.1 version: 25.0.1