summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers/webAuthnAbortService.test.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-09-28 21:14:32 -0700
committerGitHub <noreply@github.com>2022-09-28 21:14:32 -0700
commit8b75f0836e39df29b8593f96fb806608c2a81196 (patch)
treeba1d6e1346ba40cddc35f5a9c2f3ca68358eecc2 /packages/browser/src/helpers/webAuthnAbortService.test.ts
parente64b50cc84d49478d49e0a394511963d0110277b (diff)
parent4ea0bd370609294e3cf70f467d234093fc6e87fb (diff)
Merge pull request #275 from MasterKale/fix/webauthn-abort-controller-race-condition
fix/webauthn-abort-controller-race-condition
Diffstat (limited to 'packages/browser/src/helpers/webAuthnAbortService.test.ts')
-rw-r--r--packages/browser/src/helpers/webAuthnAbortService.test.ts20
1 files changed, 0 insertions, 20 deletions
diff --git a/packages/browser/src/helpers/webAuthnAbortService.test.ts b/packages/browser/src/helpers/webAuthnAbortService.test.ts
index f4e6344..294a894 100644
--- a/packages/browser/src/helpers/webAuthnAbortService.test.ts
+++ b/packages/browser/src/helpers/webAuthnAbortService.test.ts
@@ -20,23 +20,3 @@ test('should call abort() on existing controller when creating a new signal', ()
webauthnAbortService.createNewAbortSignal();
expect(abortSpy).toHaveBeenCalledTimes(1);
});
-
-test('should reset controller', () => {
- // Reset the service
- webauthnAbortService.reset();
-
- // Populate `.controller`
- webauthnAbortService.createNewAbortSignal();
-
- // Spy on the existing instance of AbortController
- const abortSpy = jest.fn();
- // @ts-ignore
- webauthnAbortService.controller?.abort = abortSpy;
-
- // Reset the service
- webauthnAbortService.reset();
-
- // Generate a new signal, which should NOT call `abort()` because the controller was cleared
- webauthnAbortService.createNewAbortSignal();
- expect(abortSpy).toHaveBeenCalledTimes(0);
-});