Skip to content

Migrate tests to node:test and convert CI to reusable-workflow callers - #22

Merged
00o-sh merged 4 commits into
masterfrom
claude/new-session-zrgq01
Aug 12, 2026
Merged

Migrate tests to node:test and convert CI to reusable-workflow callers#22
00o-sh merged 4 commits into
masterfrom
claude/new-session-zrgq01

Conversation

@00o-sh

@00o-sh 00o-sh commented Aug 12, 2026

Copy link
Copy Markdown

Shrinks the heaviest fork's dev tree and thins its CI, per the maintained-fork program.

CI: thin callers of shared reusable workflows

The six existing workflow files are replaced with thin callers of the reusable workflows in unabandoned/.github, and two security callers are added:

  • ci.ymlreusable-ci (node-versions [20, 22, 24], has-build: false)
  • commitlint.yml, release-please.yml, release-cut.yml, release-security.yml → their reusable versions (secrets: inherit where applicable)
  • publish.ymlreusable-publish (install-for-publish: false, secrets: inherit), with permissions: id-token: write set on the calling job for OIDC
  • codeql.yml, scorecard.yml → new security callers

All callers pin uses: at @main. They reference unabandoned/.github and will go green once unabandoned/.github#1 merges.

Tests: tape → Node's built-in node:test

Migrates the suite off tape and onto node:test / node:assert, following the events fork precedent (which solved the same "Node-core tests + tape adapter under node:test" problem).

  • Tape adapter (test/tape-adapter.js): a tape-compatible t assertion object backed by node:assert, implementing every t.* method used by test/*.js (equal/strictEqual, deepEqual/same, notEqual, ok/notOk, throws/doesNotThrow, pass/fail, comment, plan, end, …). Async tests that signal completion via t.plan(n)/t.end() are awaited via a promise returned to the node:test callback. Each test/*.js now requires ./tape-adapter instead of tape.
  • Node-core runner (test/node/index.js): each upstream Node core buffer test (test/node/test-buffer*.js) is wrapped in a node:test subtest. test/node/common.js is adapted the way events/tests/common.js was — the process.on('exit') / process.exit(1) mustCall finalization is replaced with an explicit onFinish/drainOnFinish drain, and the deferred checks run in a final subtest (not an after() hook, which would not fail the programmatic runner). Added hasCrypto = true so the real crypto-backed assertions run, plus no-op skip/printSkipMessage.
  • Entrypoint (test/index.js): requires both groups; npm test is now node test/index.js and exits non-zero on any failure.
  • Inlined trivial is-buffer / is-nan equivalents in the two test files that used them so those packages can be dropped.

Verification: npm test runs 135 tests (102 tape-style + 33 Node-core subtests including the drain), 0 failures, exit 0. Forced-failure sanity check confirmed both a broken tape-style assertion and a broken Node-core assertion produce a non-zero exit. No test files were skipped or weakened.

Dropped dev tree

Removed devDependencies used only by the old tape/browser/lint pipeline: tape, airtap, standard, browserify, uglify-js, benchmark, concat-stream, hyperquest, split, through2. Removed the now-dead standard, size, perf, perf-node, test-browser-*, and update-authors scripts, plus the perf/ and bin/ directories they supported. Kept @commitlint/cli and @commitlint/config-conventional. Runtime dependencies (base64-js, ieee754) and index.js are unchanged.

Installed packages: 733 → 77 (npm ls --all node count 734 → 78 including root).


Generated by Claude Code

claude added 4 commits August 12, 2026 04:21
Convert the six existing workflow files to thin callers of the shared
reusable workflows in unabandoned/.github, and add CodeQL and Scorecard
security callers. publish.yml sets id-token: write on the calling job for
OIDC. Callers pin @main and pass per-fork inputs (node 20/22/24,
has-build: false, install-for-publish: false).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_012QxAK8mJqNntrB9DTy9SqF
Migrate the test suite off tape and onto Node's built-in node:test /
node:assert so the dev tree no longer carries a third-party test runner,
browser harness, linter, or bundler (mirrors the events fork precedent).

- test/tape-adapter.js: tape-compatible `t` assertion object backed by
  node:assert; each tape-style file in test/*.js now requires it instead
  of 'tape'. Async tests using t.plan()/t.end() are awaited.
- test/node/common.js: replace process-exit-based mustCall finalization
  with an explicit drain (onFinish/drainOnFinish); add hasCrypto/skip.
- test/node/index.js: wrap each Node core buffer test in a node:test
  subtest and drain deferred mustCall checks in a final subtest.
- test/index.js: single entrypoint requiring both groups; `npm test` is
  `node test/index.js` and exits non-zero on failure.
- Inline trivial is-buffer/is-nan equivalents in the two test files that
  used them, so those packages can be dropped.

Drop devDependencies used only by the old pipeline: tape, airtap,
standard, browserify, uglify-js, benchmark, concat-stream, hyperquest,
split, through2. Remove dead scripts (standard, size, perf, perf-node,
test-browser-*, update-authors) and the perf/ and bin/ directories they
supported. Keep @commitlint/cli and @commitlint/config-conventional.
Runtime deps (base64-js, ieee754) and index.js are unchanged.

135 tests pass; installed packages drop from 733 to 77.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_012QxAK8mJqNntrB9DTy9SqF
@00o-sh
00o-sh merged commit 19de08f into master Aug 12, 2026
4 checks passed
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