github statelyai/xstate @xstate/test@2.0.0-beta.4

pre-releaseone hour ago

Minor Changes

  • 4a5b7bd: Add experimental createSourceCoverageSession(machine, control, { runtimeId }) for instrumented v6 source coverage. Sessions collect source outcomes and static microstep identities from a single calculation, preserve refusal observations, support event validation and SUT checks, and leave external effects unexecuted. Pair sessions with source manifests from @statelyai/sdk/source-coverage and witness planning/replay from @statelyai/graph.

    SUT checks are synchronous; promise-returning checks fail instead of reporting coverage early. Failed checks leave the last accepted model snapshot unchanged. Await each session step before starting another.

Patch Changes

  • c67e53a: Add a generate option to xstate test to sample event payloads and one startup input from JSON Schemas embedded in a machine definition. Set a seed to reproduce sampling or supply explicit cases for individual event types.

    Effect Schema string generators honor Unicode code point bounds. Generators report an error when a refinement rejects 1,000 consecutive candidates.

  • 40151a1: createPlaywrightSut(page) accepts a Page from @playwright/test 1.64 and later, where page.context().tracing.start() returns Promise<Disposable>.

Don't miss a new xstate release

NewReleases is sending notifications on new releases.