Repository navigation
@xstate/test@2.0.0-beta.2
Pre-release
Pre-release
Minor Changes
-
2ca7466: Add a SUT session
receive({ signal })hook for live model-based tests. Let an observed event advance the model and determine which inputs the test can send next. Replay fixtures check the recorded output and report when the SUT takes a different legal branch. -
e2af1dc: Add experimental
coversupport totestPaths(). Define named step predicates or consecutive step sequences to find and run walks that collectively cover them. The planner prefers fewer SUT sessions, then fewer events. SetmaxPathsto cap the number of sessions.await testPaths(model, { sut, cover: { requirements: { consecutiveUndos: [ ({ event }) => event.type === 'UNDO', ({ event }) => event.type === 'UNDO' ] } } });
-
e2af1dc: Import from
@xstate/test/pathsto generate and run deterministic test paths or replay fixtures without installing fast-check.import { testPaths } from '@xstate/test/paths'; await testPaths(machine, { pathGenerator: 'shortest', sut });
Patch Changes
- 268d54e: Preserve the original error when the test adapter's
send()throws or rejects. The failure trace shows the completed steps and the attempted event, and the replay fixture retries the failed send.