diff --git a/types/vitest.d.ts b/types/vitest.d.ts index a19295b..97fffe2 100644 --- a/types/vitest.d.ts +++ b/types/vitest.d.ts @@ -1,11 +1,20 @@ -import {type expect} from 'vitest' +/* eslint-disable @typescript-eslint/no-shadow */ + +import { + type Assertion, + type AsymmetricMatchersContaining, + type expect, +} 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 {} }