Skip to content

Commit

Permalink
Remove timeouts they only save a couple milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
technoplato committed Mar 24, 2024
1 parent 5dafcf8 commit e845718
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ describe('permission requester and checker machine', () => {

bluetoothPermissionActor.send({ type: 'triggerPermissionCheck' });

await waitFor(bluetoothPermissionActor, (state) => state.value === 'idle', {
timeout: 0,
});
await waitFor(bluetoothPermissionActor, (state) => state.value === 'idle');

expect(bluetoothPermissionActor.getSnapshot().value).toBe('idle');
expect(bluetoothPermissionActor.getSnapshot().context.statuses).toEqual({
Expand Down Expand Up @@ -81,8 +79,7 @@ describe('permission requester and checker machine', () => {

await waitFor(
actorRef,
(state) => state.children.someFooMachine?.getSnapshot().value === 'idle',
{ timeout: 0 }
(state) => state.children.someFooMachine?.getSnapshot().value === 'idle'
);

expect(result).not.toBeNull();
Expand Down Expand Up @@ -162,9 +159,7 @@ describe('permission requester and checker machine', () => {

await waitFor(
actorRef,
(state) =>
state.children.someFooMachine?.getSnapshot().value === 'idle',
{ timeout: 0 }
(state) => state.children.someFooMachine?.getSnapshot().value === 'idle'
);

expect(result).not.toBeNull();
Expand Down

0 comments on commit e845718

Please sign in to comment.