Skip to content

refactor(oxlint): use vitest expect rather than node:assert in test cases#15988

Closed
camc314 wants to merge 1 commit intomainfrom
c/11-23-refactor_oxlint_use_vitest_expect_rather_than_node_assert_in_test_cases
Closed

refactor(oxlint): use vitest expect rather than node:assert in test cases#15988
camc314 wants to merge 1 commit intomainfrom
c/11-23-refactor_oxlint_use_vitest_expect_rather_than_node_assert_in_test_cases

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Nov 23, 2025

Using vitest's expect here is more idomatic, considering we're using vitest for our tests, and it should give us better diffs in case of failures.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI labels Nov 23, 2025
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Nov 23, 2025
Copy link
Contributor Author

camc314 commented Nov 23, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 marked this pull request as ready for review November 23, 2025 12:31
Copilot AI review requested due to automatic review settings November 23, 2025 12:31
Copy link
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 refactors the test file to use Vitest's native expect API instead of Node's assert module, aligning with the existing testing patterns used throughout the codebase and improving test failure diagnostics.

  • Removes dependency on node:assert module in favor of Vitest's built-in assertions
  • Converts all assert.deepStrictEqual calls to expect().toEqual() for consistency with other test files
  • Maintains identical test logic while improving readability and error reporting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel
Copy link
Member

Superceded by #16016.

@overlookmotel overlookmotel deleted the c/11-23-refactor_oxlint_use_vitest_expect_rather_than_node_assert_in_test_cases branch November 23, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants