This commit is contained in:
+3
-1
@@ -12832,8 +12832,10 @@ function createExpect(info) {
|
||||
if (typeof m !== "function")
|
||||
throw new TypeError(`expect.extend: \`${name}\` is not a valid matcher. Must be a function, is "${typeof m}"`);
|
||||
}
|
||||
Object.assign(info.userMatchers, matchers2);
|
||||
for (const [name, matcher] of Object.entries(matchers2)) {
|
||||
if (name in allBuiltinMatchers)
|
||||
continue;
|
||||
info.userMatchers[name] = matcher;
|
||||
const { positive, inverse } = buildCustomAsymmetricMatcher(name, matcher);
|
||||
expectFn[name] = positive;
|
||||
notAsymmetric[name] = inverse;
|
||||
|
||||
Reference in New Issue
Block a user