Skip to content

ci: run the unit tests on Node 22 [20261121-fix-test-command-so-runs-node] - #103

Merged
ttncode merged 3 commits into
mainfrom
ci/20261121-fix-test-command-so-runs-node
Nov 21, 2026
Merged

ttncode merged 3 commits into
mainfrom
ci/20261121-fix-test-command-so-runs-node

Conversation

@ttncode

@ttncode ttncode commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Topic: 20261121-fix-test-command-so-runs-node

Change summary

  • node --test tests/ fails on Node 22: Cannot find module '<repo>/tests', so npm test ran no tests.
  • package.json: test is now node --test "tests/*.test.js". Node 21+ expands the quoted glob itself, as doc/api/test.md recommends, so it is the same on bash and cmd.exe. tests/dom.js (a helper) stays out.
  • ci.yml and release.yml: node-version: 20 → 22. Node 20 cannot expand the glob.

Verify

step command result
unit node --test "tests/*.test.js" exit 0 · 214/214 pass · Node 22.17.1

Verified: green, and the run describes the tree as it is now.

Ship decision: GO

No Critical or Important finding. 8 review readers, 0 fix-now findings.

Things I didn't touch

  • No engines field or .nvmrc. On Node 20, npm test now fails loudly ("Could not find").
  • The glob does not recurse; tests/ has no subfolders today.
  • Pinning actions to commit SHAs, and the unpinned msedgedriver-tool install (both pre-existing).

Release

20261121-fix-test-command-so-runs-node — test command on Node 22

Change

  • Fixed: npm test runs the unit suite on Node 22, and CI and release builds run on Node 22. Nothing changes for people using the app.

Before release

  • The change carries no migration and reads no new configuration value. (checked)
  • kiln verify ran the full unit suite (npm test's new form): exit 0, 214 of 214 pass on Node 22.17.1. (checked)
  • The CI "Unit tests" step on windows-2022 shows # tests 214 on this pull request. (confirm)

Release steps

  1. Merge the pull request once CI is green.
  2. Nothing else: the release workflow picks up Node 22 at the next v* tag.

After release

  • The next v* tag's Release run passes its npm test step on Node 22. (confirm)

Rollback

  • Trigger: CI or the Release run fails on Node 22 in its install or unit-test step.
  • Steps: git revert the merge commit, then open and merge that pull request.
  • Time: one revert pull request.

node --test tests/ fails on Node 22 with "Cannot find module '.../tests'",
so npm test ran no tests. Pass the quoted glob "tests/*.test.js", which
Node 21+ expands itself on every shell, and move CI and release to Node 22.
@ttncode ttncode mentioned this pull request Nov 21, 2026
3 tasks
@ttncode
ttncode merged commit 113c0e8 into main Nov 21, 2026
1 check passed
@ttncode
ttncode deleted the ci/20261121-fix-test-command-so-runs-node branch November 21, 2026 07:21
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