refactor: migrate to Node.js native test runner and fix runtime bugs#6
Merged
refactor: migrate to Node.js native test runner and fix runtime bugs#6
Conversation
- Remove Vitest dependencies (@vitest/ui, vitest) - Remove vitest.config.ts - Add Sinon for mocking (though not used due to ES module limitations) - Update all test files to use node:test and node:assert/strict - Update test script to use tsx --test - Update CLAUDE.md with new test patterns - Tests now use real systeminformation calls instead of mocks Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
…cks flag Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
The main action was trying to spawn server.ts instead of server.bundle.js, causing the server to fail to start in CI. This resulted in ECONNREFUSED errors when the post action tried to fetch metrics. Changed server.ts to server.bundle.js in the spawn call so it correctly references the bundled JavaScript file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
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.
Migrates from Vitest to Node.js native test runner, simplifies build system, and fixes critical post-action bugs causing CI failures.
Testing Framework Migration
node:test) replaces Vitestmock.timers.enable()- tests run in ~400ms vs 21+ secondsmock.module()for systeminformationnode:assert/strictPackage Management & Build
dist/main/index.bundle.js)Bug Fixes
Port race condition (6f43b75)
get-portallocated different ports per process → ECONNREFUSEDsrc/lib.tsAbortError in post action (3cddd03)
setTimeoutfromnode:timers/promisesinstead of callback-basedclearTimerController.abort()Configuration
.node-version:24.13.0→24action.yml: updated branding, author, entry pointsvitest.config.ts,eslint.config.mjs, unused build scripts.github/workflows/copilot-setup-steps.ymlBreaking Changes
None - external API unchanged.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh gh pr view claude/convert-to-native-node-test-REDACTED --json title,body,number /home/REDACTED/.nvm/install.sh /home/REDACTED/.nvm/nvm-exec /home/REDACTED/.nvm/nvm.sh /home/REDACTED/.nvm/package.json /home/REDACTED/.nvm/rename_test.sh /home/REDACTED/.nvm/test /hom��(http block)If you need me to access, download, or install something from one of these locations, you can either: