Update tests to be more resilient against assert message changes in Node core #10111
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
chore
This change is not user-facing
good first issue
Good for people who haven't worked on ESLint before
Our tests for
RuleTester
currently make assertions about the error messages thatRuleTester
outputs. These tests have been broken a few times in the past due to changes in the error messages created by Node'sassert
module (e.g. #9688, nodejs/node#19467 (comment)). Having the tests break is generally inconvenient (among other things, Node runs theeslint
tests as part of citgm in order to detect regressions), so we should try to make these tests more robust.One way to do it would be to dynamically generate an expected error message as part of the test. For example, we could replace the code here:
...with something like this:
The text was updated successfully, but these errors were encountered: