diff options
Diffstat (limited to 'packages/browser/src')
-rw-r--r-- | packages/browser/src/setupTests.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/browser/src/setupTests.ts b/packages/browser/src/setupTests.ts index 019ba42..042dc9c 100644 --- a/packages/browser/src/setupTests.ts +++ b/packages/browser/src/setupTests.ts @@ -7,10 +7,11 @@ * JSDom doesn't seem to support `credentials`, so let's define them here so we can mock their * implementations in specific tests. */ -// @ts-ignore 2540 -window.navigator.credentials = { - // attestation - create: jest.fn(), - // assertion - get: jest.fn(), -}; +Object.defineProperty(window.navigator, 'credentials', { + writable: true, + value: { + create: jest.fn(), + get: jest.fn(), + }, +}); + |