Skip to content

Convert 9 more tests to test:node (14/24)#1369

Merged
aomarks merged 12 commits into
mainfrom
node-test
Dec 24, 2025
Merged

Convert 9 more tests to test:node (14/24)#1369
aomarks merged 12 commits into
mainfrom
node-test

Conversation

@aomarks

@aomarks aomarks commented Dec 24, 2025

Copy link
Copy Markdown
Member

No description provided.

@aomarks aomarks force-pushed the node-test branch 4 times, most recently from 75034b4 to a132829 Compare December 24, 2025 03:18
@aomarks aomarks merged commit 391710c into main Dec 24, 2025
25 checks passed
@aomarks aomarks deleted the node-test branch December 24, 2025 03:27
aomarks pushed a commit that referenced this pull request Jun 13, 2026
* Remove uvu in favor of node:test (24/24)

Complete the migration started in #1369 by converting the remaining
12 test files and 2 shared utilities from uvu to node:test. Also
update the already-converted files to use the renamed rigTest export
(previously rigTestNode).

- Replace uvu/assert with node:assert, mapping assert.not() to
  assert.ok(!(...)), assert.is() to assert.strictEqual(),
  assert.instance() to assert.ok(x instanceof T),
  assert.unreachable() to assert.fail(), and assert.equal() on
  objects/arrays to assert.deepEqual()
- Convert suite-based tests (before.each/after.each context) to
  inline setup with AsyncDisposable or beforeEach/afterEach
- Consolidate rigTestNode into rigTest with optional ms and env
  options for timeout and environment variable forwarding
- Remove dead NODE_MAJOR_VERSION < 16 branch in check-script-output
- Update all wireit commands from uvu to node --test
- Remove uvu from devDependencies

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix vscode extension test entrypoint and timer leak

Address review findings:

- Replace uvu-entrypoint.ts with entrypoint.ts that uses node:test's
  run() API to execute tests inside the vscode electron process. The
  old entrypoint called uvu-specific test.after()/test.run() on a
  removed export, breaking vscode extension tests entirely.
- Update runner.ts to reference the new entrypoint and remove
  uvu-specific error handling.
- Fix timer leak in rigTest timeout: add .finally(() =>
  clearTimeout(timerId)) to the Promise.race so the setTimeout is
  cleaned up when the handler resolves before the timeout fires.

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Skip hanging service test under node:test

The "caching with service dependencies works in watch mode" test
hangs under node:test's runner. Add --test-force-exit to the
service test command and skip the hanging test for now.

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Remove --test-force-exit flag unsupported on Node 18/20

The --test-force-exit flag was added in Node 22.1.0 and causes an
immediate crash ("bad option") on Node 18 and 20. The skipped
hanging test is sufficient to prevent the service test from hanging,
so the flag is not needed.

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant