-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Update tests to be more resilient against assert message changes in Node core #10111
Copy link
Copy link
Closed
Closed
Copy link
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionchoreThis change is not user-facingThis change is not user-facinggood first issueGood for people who haven't worked on ESLint beforeGood for people who haven't worked on ESLint before
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionchoreThis change is not user-facingThis change is not user-facinggood first issueGood for people who haven't worked on ESLint beforeGood for people who haven't worked on ESLint before
Our tests for
RuleTestercurrently make assertions about the error messages thatRuleTesteroutputs. These tests have been broken a few times in the past due to changes in the error messages created by Node'sassertmodule (e.g. #9688, nodejs/node#19467 (comment)). Having the tests break is generally inconvenient (among other things, Node runs theeslinttests 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: