Skip to content

Commit 13996cf

Browse files
committed
Hacketyfix
1 parent 553182f commit 13996cf

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/createTopLevelExpect.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,14 +1458,6 @@ expectPrototype._executeExpect = function (
14581458
}
14591459
}
14601460

1461-
if (assertionRule.expect && assertionRule.expect !== this._topLevelExpect) {
1462-
return assertionRule.expect._expect(context, [
1463-
subject,
1464-
testDescriptionString,
1465-
...args,
1466-
]);
1467-
}
1468-
14691461
const wrappedExpect = this._createWrappedExpect(
14701462
assertionRule,
14711463
subject,
@@ -1475,6 +1467,17 @@ expectPrototype._executeExpect = function (
14751467
forwardedFlags
14761468
);
14771469

1470+
if (assertionRule.expect && assertionRule.expect !== this._topLevelExpect) {
1471+
return {
1472+
result: assertionRule.expect._expect(context, [
1473+
subject,
1474+
testDescriptionString,
1475+
...args,
1476+
]),
1477+
expect: wrappedExpect,
1478+
};
1479+
}
1480+
14781481
return {
14791482
result: oathbreaker(assertionRule.handler(wrappedExpect, subject, ...args)),
14801483
wrappedExpect,

0 commit comments

Comments
 (0)