diff --git a/.changeset/itchy-chicken-admire.md b/.changeset/itchy-chicken-admire.md new file mode 100644 index 00000000..ac22881d --- /dev/null +++ b/.changeset/itchy-chicken-admire.md @@ -0,0 +1,5 @@ +--- +'jest-extended': patch +--- + +fix compatibility with vitest 0.31.0 diff --git a/types/index.d.ts b/types/index.d.ts index 16626d35..ccbe5d71 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -interface CustomMatchers extends Record { +export interface CustomMatchers extends Record { /** * Note: Currently unimplemented * Passing assertion @@ -887,7 +887,10 @@ declare namespace Vi { } // Changed since vitest 0.31.0. Usefull for every vitest version after 0.31.0 +import 'vitest'; declare module 'vitest' { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface Assertion extends CustomMatchers {} // eslint-disable-next-line @typescript-eslint/no-empty-interface interface AsymmetricMatchersContaining extends CustomMatchers {} }