Skip to content
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

prefer-set-has: Use snapshot to test #2035

Merged
merged 9 commits into from
Feb 2, 2023

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Feb 2, 2023

Just a refactor to use snapshot test in prefer-set-has.

I found it's a lot of work to change old test to use snapshot test, so I wrote an internal ESLint rule internal-rules/fix-snapshot-test.

By changing

- test()
+ /* fix */ test.snapshot()

will get the job done.

Without /* fix */, this rule will disable auto-fix. Since this rule deletes lots of code, I don't want other developer lot their work by accident.

@fisker fisker marked this pull request as ready for review February 2, 2023 08:03
@fisker fisker merged commit 00883a8 into sindresorhus:main Feb 2, 2023
@fisker fisker deleted the fix-snapshot-test branch February 2, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant