summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers/webAuthnAbortService.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/browser/src/helpers/webAuthnAbortService.test.ts')
-rw-r--r--packages/browser/src/helpers/webAuthnAbortService.test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/browser/src/helpers/webAuthnAbortService.test.ts b/packages/browser/src/helpers/webAuthnAbortService.test.ts
index 506bb2a..a538dff 100644
--- a/packages/browser/src/helpers/webAuthnAbortService.test.ts
+++ b/packages/browser/src/helpers/webAuthnAbortService.test.ts
@@ -1,23 +1,23 @@
-import { webauthnAbortService } from './webAuthnAbortService';
+import { WebauthnAbortService } from './webAuthnAbortService';
test('should create a new abort signal every time', () => {
- const signal1 = webauthnAbortService.createNewAbortSignal();
- const signal2 = webauthnAbortService.createNewAbortSignal();
+ const signal1 = WebauthnAbortService.createNewAbortSignal();
+ const signal2 = WebauthnAbortService.createNewAbortSignal();
expect(signal2).not.toBe(signal1);
});
test('should call abort() with AbortError on existing controller when creating a new signal', () => {
// Populate `.controller`
- webauthnAbortService.createNewAbortSignal();
+ WebauthnAbortService.createNewAbortSignal();
// Spy on the existing instance of AbortController
const abortSpy = jest.fn();
// @ts-ignore: Ignore the fact that `controller` is private
- webauthnAbortService.controller.abort = abortSpy;
+ WebauthnAbortService.controller.abort = abortSpy;
// Generate a new signal, which should call `abort()` on the existing controller
- webauthnAbortService.createNewAbortSignal();
+ WebauthnAbortService.createNewAbortSignal();
expect(abortSpy).toHaveBeenCalledTimes(1);
// Make sure we raise an AbortError so it can be detected correctly