Testing strategy

Small checks. Clear evidence.

Five vanilla-test suites divide 83 nonduplicated shared checks by purpose, then run the same untransformed module in Node.js and real Chrome coverage.

js-message works with bundlers and without a bundler.

Bundlers resolve the bare js-message import normally. Native browser ESM resolves it through a standard import map, with no build or transpilation step; the shared catalog proves that browser path in real Chrome.

Five suites, one contract

Each behavior belongs to exactly one suite. The split makes individual checks easier to scan without repeating the same assertion under multiple labels.

7 checks

Behavioral

Consumer journeys across request/reply, object, signal, diagnostic, stream, cross-entry, and native-browser boundaries.

Review Behavioral checks →
83 shared runtime checks.

Node and Chrome execute the same catalog through vanilla-test. Chrome then adds twelve distinct playground integration cases, INT-BROWSER-01 through INT-BROWSER-12, without inflating the shared count.

Local commands

npm ci
npm test
npm run test:unit
npm run test:functional
npm run test:behavioral
npm run test:integration
npm run test:regression
npm run test:playground
npm run coverage:node
npm run coverage:chrome
npm run test:package
npm run benchmark
npm start

The package, development tools, and coverage require Node.js 22.13 or newer. CI executes the complete suite at that exact floor.

Coverage and delivery gates

  • Node and Chrome independently require 100% statements, branches, functions, and lines across the shipped modules.
  • Linux, macOS, and Windows run the package suite on current Node releases.
  • The exact Node 22.13 runtime floor executes the complete suite and packed artifact.
  • npm pack is inspected and installed in a clean temporary project, then exercised through real ESM and CommonJS imports.
  • GitHub Pages receives an explicit allowlist only after required test jobs pass.
Published code is the test target.

The root package import, both supported deep paths, and the browser-global file are verified directly—no generated build stands between the tests and npm files.