Skip to content

Commit

Permalink
Fix todo, let actor dispatch its own request
Browse files Browse the repository at this point in the history
  • Loading branch information
technoplato committed Apr 8, 2024
1 parent fff98c7 commit 5b12ad8
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,9 @@ describe('Counting Machine That Needs Permission At 3', () => {
ActorSystemIds.permissionCheckerAndRequester
);

// TODO, this should be handled by sending an event to the countingActor
permissionCheckerActor.send({
type: 'triggerPermissionRequest',
permission: Permissions.bluetooth,
});
countingActor.send({ type: 'user.didTapBluetoothRequestPermission' });

await waitFor(permissionCheckerActor, (state) => state.value === 'idle');
await waitFor(countingActor, (state) => state.value.counting === 'enabled');

expect(countingActor.getSnapshot().value).toStrictEqual({
counting: 'enabled',
Expand Down

0 comments on commit 5b12ad8

Please sign in to comment.