From 1ad30915271dcd32f8832cca7450717d66e125de Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 5 Dec 2017 16:45:19 -0500 Subject: [PATCH] Chore: fix test-suite to work with node master (#9688) Changes to the output of strictEqual are breaking the test suite This minor adjustment to the regex will fix Node 10+ while keeping support for older versions of node --- tests/lib/testers/rule-tester.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/testers/rule-tester.js b/tests/lib/testers/rule-tester.js index 195a616d4a5..d7a4bd51c30 100644 --- a/tests/lib/testers/rule-tester.js +++ b/tests/lib/testers/rule-tester.js @@ -126,7 +126,7 @@ describe("RuleTester", () => { { code: "var foo = bar;", errors: [{ message: "Bad error message." }] } ] }); - }, /Bad var\..*==.*Bad error message/); + }, /Bad var\.((.*==)|(.*strictEqual)).*Bad error message/); }); it("should throw an error when the error message regex does not match", () => { @@ -167,7 +167,7 @@ describe("RuleTester", () => { { code: "var foo = bar;", errors: ["Bad error message."] } ] }); - }, /Bad var\..*==.*Bad error message/); + }, /Bad var\.((.*==)|(.*strictEqual)).*Bad error message/); }); it("should throw an error when the error is a string and it does not match error message", () => {