Skip to content

Commit 9152417

Browse files
Fix: deprecation warning in RuleTester using Node v11 (#11009)
1 parent e349a03 commit 9152417

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/testers/rule-tester.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ class RuleTester {
397397
*/
398398
function assertASTDidntChange(beforeAST, afterAST) {
399399
if (!lodash.isEqual(beforeAST, afterAST)) {
400-
assert.fail(null, null, "Rule should not modify AST.");
400+
assert.fail("Rule should not modify AST.");
401401
}
402402
}
403403

@@ -551,7 +551,7 @@ class RuleTester {
551551
} else {
552552

553553
// Message was an unexpected type
554-
assert.fail(message, null, "Error should be a string, object, or RegExp.");
554+
assert.fail(`Error should be a string, object, or RegExp, but found (${util.inspect(message)})`);
555555
}
556556
}
557557
}

0 commit comments

Comments
 (0)