Skip to content

Commit

Permalink
[Robustness] use cached .test
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 14, 2022
1 parent a1c266b commit 86ec0b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/test.js
Expand Up @@ -553,7 +553,7 @@ Test.prototype['throws'] = function (fn, expected, msg, extra) {
var passed = caught;

if (isRegExp(expected)) {
passed = expected.test(caught && caught.error);
passed = $test(expected, caught && caught.error);
expected = String(expected);
}

Expand Down

0 comments on commit 86ec0b2

Please sign in to comment.