Skip to content

Specbook 0.3.0

Choose a tag to compare

@ajaishankar ajaishankar released this 17 Oct 15:53
· 67 commits to main since this release

The docs site is live at docs.specbook.dev, and the runner, reporters and QA portal are production-grade.

Breaking changes

  • Mocks moved out of the request. The mock: field is gone. Wrap the request in withMock, typed from the operation:
    export default withMock(GetOrderById.request({ /* ... */ }), (req, res) => {
      if (res.status === 200) res.data.status = 'placed'
    })
    Most requests need no hook: the mock environment answers from your spec's examples with the request's values filled in.
  • The play panel opens from data-specbook-try and data-specbook-flow. The old data-specbook, data-operation and data-sequence attributes are removed.
  • specbook test replaces specbook run.

What's new

  • Test and monitor: list, JUnit, GitHub, JSON and NDJSON reporters, tags, retries with flaky detection, --safe for production, secrets masked in every report, and a failing check shown as expected versus received.
  • specbook bundle: your tests as one .mjs that runs with just node.
  • specbook build --minimal: a portal of just your requests and flows, for QA.
  • Timeouts and Stop: timeoutMs in the config and --timeout on the CLI (default 30 s, 0 waits), and a Stop button for flows and requests in the UI.
  • Inputs: generated defaults for flow inputs, and Run with defaults in the UI.
  • specbook add <service> --spec <url> downloads and records a spec, and --refresh fetches it again.
  • Docs site and demo: a demo API that runs as a service worker, and a terminal that runs the real runner in the page.

Fixes

  • A run that returns something unexpected no longer freezes the panel.
  • A select whose default is not one of its options now picks the first option.
  • A request that times out says so.

Packages: @specbook/core, codegen, vite, ui, cli. The viewer zip, with checksums and a build attestation, is attached below.

Full changelog: v0.2.0...v0.3.0