We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28aae5c commit bb6e4fcCopy full SHA for bb6e4fc
packages/credential-provider-cognito-identity/src/localStorage.spec.ts
@@ -10,7 +10,12 @@ describe("localStorage", () => {
10
11
beforeEach(() => {
12
if (window) {
13
- (window.localStorage as any) = undefined;
+ Object.defineProperty(window, "localStorage", {
14
+ writable: true,
15
+ configurable: true,
16
+ enumerable: true,
17
+ value: undefined,
18
+ });
19
}
20
21
if (self) {
@@ -20,7 +25,12 @@ describe("localStorage", () => {
25
26
afterEach(() => {
22
27
23
- (window.localStorage as any) = storageAtInit;
28
29
30
31
32
+ value: storageAtInit,
33
24
34
35
36
0 commit comments