New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: fix test-suite to work with node master #9688
test: fix test-suite to work with node master #9688
Conversation
a5127ef
to
d3f9239
Compare
tests/lib/testers/rule-tester.js
Outdated
@@ -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/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you just need one |
here.
tests/lib/testers/rule-tester.js
Outdated
@@ -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/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
I agree with @j-f1's comments, although I don't think they're blockers.
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
d3f9239
to
5aba33f
Compare
Updated with notes PTAL. Was thinking JS and not regex... || actually was causing the expression to always pass 😅 Replaced with single | and added |
Thanks! |
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
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