Open
Description
openedon Aug 16, 2021
We test rules with a custom rule tester doing a snapshot test.
The built-in RuleTester can't customize the output assertion, we don't have the output to send to RuleTester
, so we have to use SourceCodeFixer
to apply fix from messages
. Full implementation
We definitely want a better way to do snapshot test, maybe pass an assert
option in future, but before that, can we expose SourceCodeFixer
, so I can apply fix from the message?
The version of ESLint you are using.
8.0.0-beta.0
The problem you want to solve.
Fix our rule tester.
Are you willing to submit a pull request to implement this change?
Yes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Relates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featuresThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintImportant details about this change need to be discussedImportant details about this change need to be discussed
Type
Projects
Status
Waiting for RFC