Skip to content

chore: migrate node:test tests to vitest - #317

Merged
cryptodev-2s merged 4 commits into
chore/migrate-jest-to-vitestfrom
chore/migrate-node-test-to-vitest
Nov 17, 2026
Merged

cryptodev-2s merged 4 commits into
chore/migrate-jest-to-vitestfrom
chore/migrate-node-test-to-vitest

Conversation

@cryptodev-2s

@cryptodev-2s cryptodev-2s commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Moves the node:test tests under .github to vitest as their own project, fixing the vitest lint violations instead of suppressing them, and counts the workflow scripts in coverage with one combined threshold (reset to about 41%).


Note

Low Risk
Test-runner and lint-config only; production workflow behavior is unchanged aside from how tests are executed and measured.

Overview
Unifies .github workflow tests under Vitest instead of node:test plus a separate node --test pass: assertions switch to expect, mocks use vi, and the root test script runs only vitest run --coverage.

vitest.config.mts gains a workflow-scripts project (30s timeout for git-heavy tests) alongside src, and coverage now includes .github implementation files with combined thresholds reset to ~41%. Oxlint drops the old node-test override and test-file suppressions by aligning rules for Vitest and allowing sync/env usage in tests and workflow scripts.

Reviewed by Cursor Bugbot for commit b6b3dfa. Bugbot is set up for automated code reviews on this repo. Configure here.

@cryptodev-2s
cryptodev-2s added this pull request to stack #319 November 11, 2026 21:12
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 53fe78b to 8b4c37c Compare November 12, 2026 10:08
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 8b4c37c to 4fd36ad Compare November 12, 2026 10:15
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 4fd36ad to 912de37 Compare November 12, 2026 10:21
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 912de37 to 23fa3c5 Compare November 12, 2026 10:25
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch 2 times, most recently from 97caa82 to ffddff6 Compare November 12, 2026 13:04
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from ffddff6 to 1efb5d5 Compare November 12, 2026 18:44
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 1efb5d5 to 64b9cc4 Compare November 16, 2026 10:06
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 64b9cc4 to 0a8612e Compare November 16, 2026 10:11
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 0a8612e to e9ccb89 Compare November 16, 2026 10:25
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch 2 times, most recently from b68613c to 83225c8 Compare November 16, 2026 10:49
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 83225c8 to 0b4ec41 Compare November 16, 2026 11:02
@cryptodev-2s
cryptodev-2s removed this pull request from stack #319 November 16, 2026 13:59
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 0b4ec41 to d1601ae Compare November 16, 2026 14:00
@cryptodev-2s
cryptodev-2s added this pull request to stack #329 November 16, 2026 14:00
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from d1601ae to 77758a5 Compare November 16, 2026 14:25
@cryptodev-2s
cryptodev-2s marked this pull request as ready for review November 16, 2026 14:58
@cryptodev-2s cryptodev-2s self-assigned this Nov 16, 2026
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 77758a5 to 4e08f2e Compare November 16, 2026 15:10
Comment thread oxlint-suppressions.json Outdated
"vitest/no-conditional-in-test": {
"count": 3
},
"vitest/prefer-to-have-length": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we fix these instead of adding suppressions? A lot of these seem easy to fix at least.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed here 7e4b75f

@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch 3 times, most recently from 5ca7ea3 to f22e45c Compare November 17, 2026 09:46
@cryptodev-2s
cryptodev-2s requested a review from Mrtenz November 17, 2026 10:11
@cryptodev-2s
cryptodev-2s force-pushed the chore/migrate-node-test-to-vitest branch from 7e4b75f to b6b3dfa Compare November 17, 2026 10:27
@cryptodev-2s
cryptodev-2s merged commit 38f88e4 into main Nov 17, 2026
17 checks passed
@cryptodev-2s
cryptodev-2s deleted the chore/migrate-node-test-to-vitest branch November 17, 2026 12:10
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.

2 participants