Skip to content

Commit

Permalink
Chore: fix test-suite to work with node master (#9688)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MylesBorins authored and not-an-aardvark committed Dec 5, 2017
1 parent cdb1488 commit 1ad3091
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/testers/rule-tester.js
Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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", () => {
Expand Down

0 comments on commit 1ad3091

Please sign in to comment.