Skip to content

Commit

Permalink
fix(expect): don't fail when using jest expect (vitest-dev#4517)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored and LorenzoBloedow committed Dec 19, 2023
1 parent f67c10d commit 7c3bf0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/expect/src/jest-extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ function getMatcherState(assertion: Chai.AssertionStatic & Chai.Assertion, expec

const matcherState: MatcherState = {
...getState(expect),
// TODO: implement via expect.addEqualityTesters
customTesters: [],
isNot,
utils: jestUtils,
promise,
Expand Down
1 change: 1 addition & 0 deletions packages/expect/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface MatcherHintOptions {
}

export interface MatcherState {
customTesters: Array<Tester>
assertionCalls: number
currentTestName?: string
dontThrow?: () => void
Expand Down

0 comments on commit 7c3bf0d

Please sign in to comment.