From c0e63ec49de7b84db33058df71e52513d68cffe9 Mon Sep 17 00:00:00 2001 From: Dina Date: Wed, 12 Mar 2025 17:58:49 +1100 Subject: [PATCH] fix: import vitest is not needed to extend the module The import is causing an issue as it is now making vitest a dependency of the module and results in error when running tests such as: ``` Error: Cannot find package 'vitest' imported from /path/to/project/ui/node_modules/.pnpm/@testing-library+jest-dom@6.6.3/node_modules/@testing-library/jest-dom/dist/vitest.mjs ``` --- types/vitest.d.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/types/vitest.d.ts b/types/vitest.d.ts index 3ee9eb2..de4aed9 100644 --- a/types/vitest.d.ts +++ b/types/vitest.d.ts @@ -1,15 +1,7 @@ -import 'vitest' import {type TestingLibraryMatchers} from './matchers' declare module 'vitest' { - interface Assertion - extends TestingLibraryMatchers< - any, - T - > {} + interface Assertion extends TestingLibraryMatchers {} interface AsymmetricMatchersContaining - extends TestingLibraryMatchers< - any, - any - > {} + extends TestingLibraryMatchers {} }