Skip to content

Build Compatibility Tests

These tests verify that published artifacts work across module systems.

Files

FileTarget
tests/Builds/cjs.test.cjsCommonJS runtime
tests/Builds/esm.test.mjsES Module runtime
tests/Builds/umd.test.cjsUMD/global runtime
tests/Builds/umd.htmlManual browser UMD smoke page
tests/Builds/ts.test.tsType-level import usage check

What They Validate

  • new ME() remains callable as proxy function.
  • basic semantic write/read works after build.
  • exports are correctly wired in each module format.
  • UMD global export exists and is executable in a sandbox.

Run

bash
node tests/Builds/cjs.test.cjs
node tests/Builds/esm.test.mjs
node tests/Builds/umd.test.cjs

or via gate:

bash
npm run test:prebuild

Release Relevance

These tests protect the npm consumer surface:

  • import consumers (modern tooling),
  • require consumers (legacy Node),
  • browser consumers (UMD script usage).