Skip to main content

Testing and CI

Recommended test layers, CI commands, and production release checks for registry-build consumers.

LayerWhat to testWhy
Config testsloading, defaults, merge, extends, validationcatches wrong config shape early
Extension testsindex-build, components, colors, component-index, adapterscatches deterministic output regressions
Change detection testscache keys, affected-path matching, incremental rebuildproves cache correctness
Golden testsfull generated fixture treeprotects output contracts
Consumer smoke testsreal app/package scriptsproves the actual integration path
Pack/install smoke testspacked CLI works in a temp consumerproves publish surface

Good baseline commands

For the package itself:

bun run check-types
bun test
bun run build
bun run check-types
bun test
bun run build

For a real consumer:

bun run check-types
registry-build build
bun run check-types
registry-build build

For an installability check:

npm pack --dry-run
npm pack --dry-run

Golden output strategy

Golden fixtures are the strongest regression net for this kind of package.

Use them when you need to detect:

  • ordering changes
  • emitted file name changes
  • content rewrite regressions
  • stale file cleanup regressions
  • extension output drift

The most reliable pattern is:

  1. create a small fixture source tree
  2. run the full build into a temp output directory
  3. compare the generated files with checked-in expected outputs

Consumer CI example

bun run check-types
bun run build:reg
bun run build
bun run check-types
bun run build:reg
bun run build

This keeps the generated registry path in the same pipeline as the app build that consumes it.


Release checklist


Production standard