Skip to content

Commit

Permalink
fix(expect): don't fail when using jest expect (#4517)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Nov 16, 2023
1 parent 56ee702 commit 60d6d17
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 60d6d17

Please sign in to comment.