test(linter): Regenerate tests for various Unicorn rules#19428
Merged
graphite-app[bot] merged 1 commit intomainfrom Feb 16, 2026
Merged
test(linter): Regenerate tests for various Unicorn rules#19428graphite-app[bot] merged 1 commit intomainfrom
graphite-app[bot] merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR regenerates tests for several Unicorn linter rules to incorporate updated test cases from the upstream eslint-plugin-unicorn. The changes primarily update test data and snapshot files without modifying rule implementation logic.
Changes:
- Regenerated test snapshots for five Unicorn rules with updated test cases from upstream
- Converted test cases from raw string literals to plain strings and tuple format for consistency
- Added new test cases and commented out TODO items for future implementation
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/oxc_linter/src/snapshots/unicorn_prefer_spread.snap | Updated snapshot with adjusted line/column numbers and removed duplicate diagnostic |
| crates/oxc_linter/src/snapshots/unicorn_prefer_set_size.snap | Updated snapshot with new test case diagnostics |
| crates/oxc_linter/src/snapshots/unicorn_prefer_add_event_listener.snap | Updated snapshot with additional test case diagnostics |
| crates/oxc_linter/src/snapshots/unicorn_consistent_assert.snap | Updated snapshot with adjusted column numbers |
| crates/oxc_linter/src/rules/unicorn/prefer_spread.rs | Converted test cases from raw strings to plain strings; added TODO comments; normalized whitespace |
| crates/oxc_linter/src/rules/unicorn/prefer_set_size.rs | Converted test cases to tuple format; added commented TODO items for Array.from() cases |
| crates/oxc_linter/src/rules/unicorn/prefer_add_event_listener.rs | Converted test cases to tuple format; added commented TODO items for excludedPackages option |
| crates/oxc_linter/src/rules/unicorn/no_array_sort.rs | Minor whitespace adjustments in test cases; added commented TODO items |
| crates/oxc_linter/src/rules/unicorn/consistent_assert.rs | Normalized indentation in multi-line test strings |
Merging this PR will not alter performance
Comparing Footnotes
|
camc314
approved these changes
Feb 16, 2026
Contributor
Merge activity
|
This PR regenerates a few more Unicorn rules to use new tests from the upstream rules.
e93dffa to
222465c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR regenerates a few more Unicorn rules to use new tests from the upstream rules.