Skip to content

Commit

Permalink
Chore: fix test-suite to work with node master
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 committed Dec 5, 2017
1 parent cdb1488 commit d3f9239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/testers/rule-tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe("RuleTester", () => {
{ code: "var foo = bar;", errors: [{ message: "Bad error message." }] }
]
});
}, /Bad var\..*==.*Bad error message/);
}, /Bad var\.((.*==)||(strict equal)).*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 d3f9239

Please sign in to comment.