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.
Unit
Fields, serialization primitives, and the bounded playground helpers.
Review Unit checks →Functional
Construction, loading, round trips, recoverable errors, and recovery.
Review Functional checks →Behavioral
Consumer journeys across request/reply, object, signal, diagnostic, stream, cross-entry, and native-browser boundaries.
Review Behavioral checks →Integration
Root, direct, CommonJS marker, and browser-global entry points agreeing at runtime boundaries.
Review Integration checks →Regression
Coercion compatibility, optional fields, hostile errors, and native JSON failures.
Review Regression 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 startThe 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 packis 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.
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.