From e84571885d9935da07b706f4b8b0bd57569f01a9 Mon Sep 17 00:00:00 2001 From: Michael Lustig Date: Sun, 24 Mar 2024 09:27:12 -0400 Subject: [PATCH] Remove timeouts they only save a couple milliseconds --- .../permissionLogic/src/lib/permission-logic.spec.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/permissions/permissionLogic/src/lib/permission-logic.spec.ts b/libs/permissions/permissionLogic/src/lib/permission-logic.spec.ts index 586d53c..3831573 100644 --- a/libs/permissions/permissionLogic/src/lib/permission-logic.spec.ts +++ b/libs/permissions/permissionLogic/src/lib/permission-logic.spec.ts @@ -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({ @@ -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(); @@ -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();