Open Osky772 opened 1 year ago
It doesn't work for any @alpha version of @xstate/test. But somehow in Codesandbox it works https://codesandbox.io/s/xstate-test-path-filtering-forked-fnmqtw?file=/src/index.js
Can you try this with @xstate/test@beta
?
Hi @davidkpiano, we are running into the same issue on @xstate/test@1.0.0-beta.4
. Also, using the same example repo from above, we see the following TS errors (rename index.js to index.ts):
Type '{ on: { TWO: string; THREE: string; }; }' is missing the following properties from type 'TestStateNodeConfig<MachineContext, AnyEventObject>': type, history, onDone, entry, and 7 more.ts(2740)
I've discovered a bug in the documentation. You should use getShortestPaths
and not getPaths
. I've read in the Changelog that getPath
is an alias of the getShortestPaths
so it works the same
using getShortestPaths
the problem no longer appears
Description
.getPaths()
doesn't work. https://stately.ai/docs/xstate/model-based-testing/quickstartMy package.json dependencies
script.js
Expected result
.getPaths
to workActual result
It does not work
Reproduction
https://github.com/Osky772/xstate-test-bug
Additional context
No response