Skip to content

test(linter): Regenerate tests for various Unicorn rules#19428

Merged
graphite-app[bot] merged 1 commit intomainfrom
update-unicorn-tests
Feb 16, 2026
Merged

test(linter): Regenerate tests for various Unicorn rules#19428
graphite-app[bot] merged 1 commit intomainfrom
update-unicorn-tests

Conversation

@connorshea
Copy link
Copy Markdown
Member

This PR regenerates a few more Unicorn rules to use new tests from the upstream rules.

Copilot AI review requested due to automatic review settings February 16, 2026 06:50
@connorshea connorshea requested a review from camc314 as a code owner February 16, 2026 06:50
@github-actions github-actions bot added A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Feb 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 16, 2026

Merging this PR will not alter performance

✅ 47 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing update-unicorn-tests (e93dffa) with main (e4a2886)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 self-assigned this Feb 16, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Feb 16, 2026
Copy link
Copy Markdown
Contributor

camc314 commented Feb 16, 2026

Merge activity

This PR regenerates a few more Unicorn rules to use new tests from the upstream rules.
@graphite-app graphite-app bot force-pushed the update-unicorn-tests branch from e93dffa to 222465c Compare February 16, 2026 09:22
@graphite-app graphite-app bot merged commit 222465c into main Feb 16, 2026
21 checks passed
@graphite-app graphite-app bot deleted the update-unicorn-tests branch February 16, 2026 09:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 16, 2026
camc314 added a commit that referenced this pull request Apr 3, 2026
…ize` rule (#21016)

fixed commented out tests in #19428 for `Array.from()` in `unicorn/prefer-set-size` rule

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
camc314 pushed a commit that referenced this pull request Apr 6, 2026
…-map` (#21082)

fixes commented out tests for optionals in
#19428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants