@putnami/spectest
v0.3.0
Published
Executable-spec test binding for Bun: specTest declares which feature requirement check a test proves and records the observation for the spec gate
Readme
@putnami/spectest
Binds bun:test tests to the executable-spec checks they prove, so the spec gate can read their verdicts.
import { specTest } from '@putnami/spectest';
specTest('a broken link fails the gate', { feature: 'docs/links', requirement: 'broken-links-fail', check: 'names-the-link' }, () => {
// ...
});specTest registers an ordinary test. observeMeasurement registers a test that returns the number a threshold check measures. Outside a Putnami test run, both register the test unchanged and write nothing.
Most projects import the same functions from @putnami/runtime/spectest, which re-exports this package.
Commands
putnami lint,test,build @putnami/spectest # check it the way CI doesDocumentation
- The TypeScript test job explains how the fragments become the project's verification report.
src/index.tsdocuments the wire format and why a fragment can never turn a failing test green.
