(received: unknown, expected: unknown)
| 949 | }, |
| 950 | |
| 951 | toStrictEqual(received: unknown, expected: unknown) { |
| 952 | const matcherName = 'toStrictEqual'; |
| 953 | const options: MatcherHintOptions = { |
| 954 | comment: 'deep equality', |
| 955 | isNot: this.isNot, |
| 956 | promise: this.promise, |
| 957 | }; |
| 958 | |
| 959 | const pass = equals( |
| 960 | received, |
| 961 | expected, |
| 962 | [...this.customTesters, ...toStrictEqualTesters], |
| 963 | true, |
| 964 | ); |
| 965 | |
| 966 | const message = pass |
| 967 | ? () => |
| 968 | // eslint-disable-next-line prefer-template |
| 969 | matcherHint(matcherName, undefined, undefined, options) + |
| 970 | '\n\n' + |
| 971 | `Expected: not ${printExpected(expected)}\n` + |
| 972 | (stringify(expected) === stringify(received) |
| 973 | ? '' |
| 974 | : `Received: ${printReceived(received)}`) |
| 975 | : () => |
| 976 | // eslint-disable-next-line prefer-template |
| 977 | matcherHint(matcherName, undefined, undefined, options) + |
| 978 | '\n\n' + |
| 979 | printDiffOrStringify( |
| 980 | expected, |
| 981 | received, |
| 982 | EXPECTED_LABEL, |
| 983 | RECEIVED_LABEL, |
| 984 | isExpand(this.expand), |
| 985 | ); |
| 986 | |
| 987 | // Passing the actual and expected objects so that a custom reporter |
| 988 | // could access them, for example in order to display a custom visual diff, |
| 989 | // or create a different error message |
| 990 | return {actual: received, expected, message, name: matcherName, pass}; |
| 991 | }, |
| 992 | }; |
| 993 | |
| 994 | export default matchers; |
nothing calls this directly
no test coverage detected