You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should use a snapshot system to test rules with each rule having a rule-name.ts fixture that is run through ESLint. Config can be provided by inline /* eslint */ comments, and any reported errors would be dumped to either a Jest snapshot or an errors.json file. We could either switch the test framework from Mocha to Jest or just import Jest’s expect function to get access to the toMatchSnapshot matcher.
The text was updated successfully, but these errors were encountered:
I’ll push an experimental version at some point, but my current version creates a tests/rules directory with a foo.src.ts source file for the foo rule and foo.snap.ts with a code frame for each rule containing the error message. I’m working on figuring out a way to support messageIds properly since ESLint doesn’t provide the data object.
We should use a snapshot system to test rules with each rule having a
rule-name.ts
fixture that is run through ESLint. Config can be provided by inline/* eslint */
comments, and any reported errors would be dumped to either a Jest snapshot or anerrors.json
file. We could either switch the test framework from Mocha to Jest or just import Jest’sexpect
function to get access to thetoMatchSnapshot
matcher.The text was updated successfully, but these errors were encountered: