Skip to content

Commit

Permalink
Revert test (happens in main)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Oct 13, 2024
1 parent 9d3f2a0 commit 4516833
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions packages/core/test/actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3549,46 +3549,6 @@ describe('raise', () => {
]
`);
});

it('a raised event "handler" should be able to read updated snapshot of self', () => {
const spy = jest.fn();
const machine = createMachine({
context: {
counter: 0
},
initial: 'a',
states: {
a: {
on: { NEXT: 'b' }
},
b: {
entry: [assign({ counter: 1 }), raise({ type: 'EVENT' })],
on: {
EVENT: {
actions: ({ self }) => spy(self.getSnapshot().context),
target: 'c'
}
}
},
c: {}
}
});

const actorRef = createActor(machine).start();

actorRef.send({ type: 'NEXT' });
actorRef.send({ type: 'EVENT' });

expect(spy).toMatchMockCallsInlineSnapshot(`
[
[
{
"counter": 1,
},
],
]
`);
});
});

describe('cancel', () => {
Expand Down

0 comments on commit 4516833

Please sign in to comment.