diff --git a/types/vitest.d.ts b/types/vitest.d.ts index a19295b..2809ffb 100644 --- a/types/vitest.d.ts +++ b/types/vitest.d.ts @@ -1,11 +1,16 @@ -import {type expect} from 'vitest' +/* eslint-disable @typescript-eslint/no-shadow */ + +import {type Assertion, type AsymmetricMatchersContaining} from 'vitest' import {type TestingLibraryMatchers} from './matchers' export {} -declare module '@vitest/expect' { - interface JestAssertion + +// https://vitest.dev/guide/extending-matchers.html +declare module 'vitest' { + interface Assertion extends TestingLibraryMatchers< ReturnType, T > {} + interface AsymmetricMatchersContaining extends TestingLibraryMatchers {} }