8000 Fix warnings and TS errors for `xstate/graph` tests (#3907) · statelyai/xstate@7401a61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7401a61

Browse files
authored
Fix warnings and TS errors for xstate/graph tests (#3907)
* Add predictableActionArguments: true to silence warnings * Use createMachine and fix target state in config * Add predictableActionArguments: true to silence warnings * Fix path to getMachineShortestPaths * Add changeset * Revert "Add predictableActionArguments: true to silence warnings" This reverts commit 75bc6c8. * Revert "Add predictableActionArguments: true to silence warnings" This reverts commit a7d1c0c. * Revert "Add changeset" This reverts commit 5f62ba0. * Remove predictableActionArguments from machine config
1 parent edc3260 commit 7401a61

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/xstate-graph/test/graph.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
Machine,
32
StateNode,
43
createMachine,
54
State,
@@ -61,7 +60,7 @@ describe('@xstate/graph', () => {
6160
}
6261
};
6362

64-
const lightMachine = Machine({
63+
const lightMachine = createMachine({
6564
key: 'light',
6665
initial: 'green',
6766
states: {
@@ -79,7 +78,7 @@ describe('@xstate/graph', () => {
7978
yellow: {
8079
on: {
8180
TIMER: 'red',
82-
POWER_OUTAGE: '#light.red.flashing'
81+
POWER_OUTAGE: 'red.flashing'
8382
}
8483
},
8584
red: {

packages/xstate-graph/test/types.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createMachine } from 'xstate';
2-
import { getMachineShortestPaths } from '../';
2+
import { getMachineShortestPaths } from '../src/shortestPaths';
33

44
describe('types', () => {
55
it('`getEvents` should be allowed to return a mutable array', () => {

0 commit comments

Comments
 (0)
0