Skip to content

test: migrate tap suite to node:test#869

Merged
mcollina merged 2 commits intomainfrom
chore/migrate-tap-to-node-test
Mar 6, 2026
Merged

test: migrate tap suite to node:test#869
mcollina merged 2 commits intomainfrom
chore/migrate-tap-to-node-test

Conversation

@mcollina
Copy link
Member

@mcollina mcollina commented Mar 2, 2026

Summary

  • migrate remaining Tap-based tests to node:test
  • replace Tap assertions in test/start.test.js via a local compat wrapper
  • migrate test/graceful-shutdown.test.js to node:test
  • remove Tap usage from examples/plugin-with-preloaded.js
  • switch npm test scripts from Tap CLI to suite-runner.js
  • remove tap and @types/tap from devDependencies

Validation

  • node --test test/start.test.js
  • node --test test/graceful-shutdown.test.js

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

Using const { test: nodeTest } = require('node:test') and keep the test() in all files
More consistence usage and easier to migrate if we plan to use another test framework.

@mcollina
Copy link
Member Author

mcollina commented Mar 5, 2026

Addressed review feedback:

  • switched to const { test: nodeTest } = require('node:test') in test/graceful-shutdown.test.js
  • kept test(...) usage consistently by defining const test = ... ? ... : nodeTest

Validation:

  • node --test test/graceful-shutdown.test.js (pass)

Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

LGTM.

@mcollina mcollina merged commit 39ea5d4 into main Mar 6, 2026
17 checks passed
@mcollina mcollina deleted the chore/migrate-tap-to-node-test branch March 6, 2026 07:09
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