Skip to content

Add generator-neutral property testing for XState v6 - #5627

Draft
davidkpiano wants to merge 8 commits into
nextfrom
feature/property-testing
Draft

Add generator-neutral property testing for XState v6#5627
davidkpiano wants to merge 8 commits into
nextfrom
feature/property-testing

Conversation

@davidkpiano

Copy link
Copy Markdown
Member

Summary

  • add generator-neutral propertyTest() to xstate/graph, accepting machines and test models
  • add exact state-node, configuration, event, transition, guard, and frontier coverage with covered/uncovered/unreachable/unknown classifications
  • add frontier selection and per-frontier budgets while preserving deterministic prefixes during shrinking
  • add independent reference-oracle and optional SUT equivalence seams
  • add chronological event/clock/checkpoint/stop commands, temporal properties, portable replay fixtures, and readable traces
  • add the optional @xstate/fast-check adapter plus an Effect Schema entrypoint without coupling XState core to either dependency

Why

Existing shortest/simple path and model-based testing cover finite representative events. This adds varied payload and sequence exploration, shrinking, deterministic replay, continuous invariants, exact transition evidence, temporal checks, and runtime/reference equivalence while preserving pure XState transition calculation.

Validation

  • pnpm test — 2,681 passed, 34 skipped, 3 todo
  • pnpm typecheck
  • pnpm lint
  • targeted formatting check for every changed source, test, package, README, workspace, and changeset file

pnpm format:check still reports only the unchanged baseline packages/core/CHANGELOG.md.

@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a5b0f21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
xstate Minor
@xstate/fast-check Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant