@applicaster/zapp-react-native-bridge 12.0.0-rc.3 → 12.0.0-rc.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`deleteFolders deletes each provided path 1`] = `true`;
3
+ exports[`fileManager deleteFolders deletes each provided path 1`] = `true`;
4
4
 
5
- exports[`storeFiles calls the store file function of the native module with the provided args 1`] = `
5
+ exports[`fileManager storeFiles calls the store file function of the native module with the provided args 1`] = `
6
6
  Object {
7
7
  "http://file": true,
8
8
  "http://file2": true,
@@ -1,30 +1,27 @@
1
1
  import * as R from "ramda";
2
+ import * as ReactNative from "react-native";
2
3
 
3
- jest.mock("react-native", () => ({
4
- NativeModules: {
5
- OfflineAssetsBridge: {
6
- storeFiles: jest.fn((files) => {
7
- if (files.includes("fail")) throw new Error("Error storing file");
4
+ const { NativeModules } = ReactNative;
8
5
 
9
- return Promise.resolve(
10
- files.reduce((acc, curr) => {
11
- return R.assoc(curr.url, true, acc);
12
- }, {})
13
- );
14
- }),
15
- delete: jest.fn((file) => {
16
- if (file.includes("fail")) throw new Error("Error deleting file");
6
+ const OfflineAssetsBridge = {
7
+ storeFiles: jest.fn((files) => {
8
+ if (files.includes("fail")) throw new Error("Error storing file");
9
+
10
+ return Promise.resolve(
11
+ files.reduce((acc, curr) => {
12
+ return R.assoc(curr.url, true, acc);
13
+ }, {})
14
+ );
15
+ }),
16
+ delete: jest.fn((file) => {
17
+ if (file.includes("fail")) throw new Error("Error deleting file");
17
18
 
18
- return Promise.resolve(true);
19
- }),
20
- getFilesDirectory: jest.fn(() => Promise.resolve("/native/path/")),
21
- },
22
- },
23
- }));
19
+ return Promise.resolve(true);
20
+ }),
21
+ getFilesDirectory: jest.fn(() => Promise.resolve("/native/path/")),
22
+ };
24
23
 
25
- const {
26
- NativeModules: { OfflineAssetsBridge },
27
- } = require("react-native");
24
+ NativeModules.OfflineAssetsBridge = OfflineAssetsBridge;
28
25
 
29
26
  const { storeFiles, deleteFolders, getNativeRootPath } = require("..");
30
27
 
@@ -34,47 +31,53 @@ function clearMocks() {
34
31
  OfflineAssetsBridge.getFilesDirectory.mockClear();
35
32
  }
36
33
 
37
- describe("storeFiles", () => {
38
- beforeEach(clearMocks);
34
+ describe("fileManager", () => {
35
+ describe("storeFiles", () => {
36
+ beforeEach(clearMocks);
39
37
 
40
- it("calls the store file function of the native module with the provided args", async () => {
41
- const files = [{ url: "http://file" }, { url: "http://file2" }];
42
- const options = {};
38
+ it("calls the store file function of the native module with the provided args", async () => {
39
+ const files = [{ url: "http://file" }, { url: "http://file2" }];
40
+ const options = {};
43
41
 
44
- const result = await storeFiles(files, options);
42
+ const result = await storeFiles(files, options);
45
43
 
46
- expect(OfflineAssetsBridge.storeFiles).toHaveBeenCalledWith(files, options);
47
- expect(result).toMatchSnapshot();
44
+ expect(OfflineAssetsBridge.storeFiles).toHaveBeenCalledWith(
45
+ files,
46
+ options
47
+ );
48
+
49
+ expect(result).toMatchSnapshot();
50
+ });
48
51
  });
49
- });
50
52
 
51
- describe("deleteFolders", () => {
52
- beforeEach(clearMocks);
53
+ describe("deleteFolders", () => {
54
+ beforeEach(clearMocks);
53
55
 
54
- it("deletes each provided path", async () => {
55
- const folders = ["folder1", "folder2", "folder3"];
56
+ it("deletes each provided path", async () => {
57
+ const folders = ["folder1", "folder2", "folder3"];
56
58
 
57
- const result = await deleteFolders(folders);
59
+ const result = await deleteFolders(folders);
58
60
 
59
- expect.assertions(folders.length + 2);
60
- expect(result).toMatchSnapshot();
61
- expect(OfflineAssetsBridge.delete).toHaveBeenCalledTimes(folders.length);
61
+ expect.assertions(folders.length + 2);
62
+ expect(result).toMatchSnapshot();
63
+ expect(OfflineAssetsBridge.delete).toHaveBeenCalledTimes(folders.length);
62
64
 
63
- folders.forEach((folder, index) => {
64
- expect(OfflineAssetsBridge.delete).toHaveBeenNthCalledWith(
65
- index + 1,
66
- folder
67
- );
65
+ folders.forEach((folder, index) => {
66
+ expect(OfflineAssetsBridge.delete).toHaveBeenNthCalledWith(
67
+ index + 1,
68
+ folder
69
+ );
70
+ });
68
71
  });
69
72
  });
70
- });
71
73
 
72
- describe("getNativeRootPath", () => {
73
- beforeEach(clearMocks);
74
+ describe("getNativeRootPath", () => {
75
+ beforeEach(clearMocks);
74
76
 
75
- it("returns the native root path", async () => {
76
- const nativePath = await OfflineAssetsBridge.getFilesDirectory();
77
+ it("returns the native root path", async () => {
78
+ const nativePath = await OfflineAssetsBridge.getFilesDirectory();
77
79
 
78
- await expect(getNativeRootPath()).resolves.toEqual(nativePath);
80
+ await expect(getNativeRootPath()).resolves.toEqual(nativePath);
81
+ });
79
82
  });
80
83
  });
@@ -80,9 +80,12 @@ export const fileIsSaved = R.curry((savedFilesResult, { file }) => {
80
80
  export const remapAssetPath = (
81
81
  assets: FilesList,
82
82
  source: Record<string, any>,
83
- localFiles: Record<string, string>
83
+ localFiles: Record<string, string>,
84
+ tag: string = "unknown"
84
85
  ): Record<string, any> => {
85
- return assets.reduce((obj, { path, url }) => {
86
+ const startTime = performance.now();
87
+
88
+ const result = assets.reduce((obj, { path, url }) => {
86
89
  const localFile = localFiles[url];
87
90
 
88
91
  if (!localFile) {
@@ -108,7 +111,11 @@ export const remapAssetPath = (
108
111
  }
109
112
 
110
113
  return obj;
111
- }, R.clone(source));
114
+ }, JSON.parse(JSON.stringify(source)));
115
+
116
+ bridgeLogger.log({ message: `remapAssetPath: remapping took ${performance.now() - startTime} ms, tag: ${tag}` });
117
+
118
+ return result;
112
119
  };
113
120
 
114
121
  export function collectAssets(object, nativeRootPath, source, path = []) {
@@ -1,27 +1,21 @@
1
- jest.mock("react-native", () => {
2
- // We're not using the vars defined below, cause jest doesn't allow mocks to refer
3
- // to out of scope variables, as they would be undefined when jest loads the mock
4
- return {
5
- NativeModules: {
6
- QuickBrickCommunicationModule: {
7
- quickBrickEvent: jest.fn(),
8
- accountId: 123,
9
- accountsAccountId: "accountsAccountIDString1234",
10
- broadcasterId: 145,
11
- bundleIdentifier: "com.apptestname",
12
- initialProps: {
13
- foo: "bar",
14
- },
15
- },
16
- },
17
- };
18
- });
1
+ import * as ReactNative from "react-native";
2
+
3
+ ReactNative.NativeModules.QuickBrickCommunicationModule = {
4
+ quickBrickEvent: jest.fn(),
5
+ accountId: 123,
6
+ accountsAccountId: "accountsAccountIDString1234",
7
+ broadcasterId: 145,
8
+ bundleIdentifier: "com.apptestname",
9
+ initialProps: {
10
+ foo: "bar",
11
+ },
12
+ };
19
13
 
20
14
  const {
21
15
  sendQuickBrickEvent,
22
16
  getAppData,
23
17
  getLegacyInitialProps,
24
- } = require("../index");
18
+ } = require("..");
25
19
 
26
20
  const eventName = "event";
27
21
  const payload = {};
@@ -33,44 +27,46 @@ const bundleIdentifier = "com.apptestname";
33
27
 
34
28
  const { NativeModules } = require("react-native");
35
29
 
36
- describe("sendQuickBrickEvent", () => {
37
- it("invokes the native module", () => {
38
- sendQuickBrickEvent(eventName, payload);
30
+ describe("QuickBrickModule", () => {
31
+ describe("sendQuickBrickEvent", () => {
32
+ it("invokes the native module", () => {
33
+ sendQuickBrickEvent(eventName, payload);
39
34
 
40
- expect(
41
- NativeModules.QuickBrickCommunicationModule.quickBrickEvent
42
- ).toHaveBeenCalledWith(eventName, payload);
43
- });
35
+ expect(
36
+ NativeModules.QuickBrickCommunicationModule.quickBrickEvent
37
+ ).toHaveBeenCalledWith(eventName, payload);
38
+ });
44
39
 
45
- it("passes an empty object as payload if not provided", () => {
46
- sendQuickBrickEvent(eventName);
40
+ it("passes an empty object as payload if not provided", () => {
41
+ sendQuickBrickEvent(eventName);
47
42
 
48
- expect(
49
- NativeModules.QuickBrickCommunicationModule.quickBrickEvent
50
- ).toHaveBeenCalledWith(eventName, {});
51
- });
43
+ expect(
44
+ NativeModules.QuickBrickCommunicationModule.quickBrickEvent
45
+ ).toHaveBeenCalledWith(eventName, {});
46
+ });
52
47
 
53
- afterEach(() => {
54
- NativeModules.QuickBrickCommunicationModule.quickBrickEvent.mockRestore();
48
+ afterEach(() => {
49
+ NativeModules.QuickBrickCommunicationModule.quickBrickEvent.mockRestore();
50
+ });
55
51
  });
56
- });
57
52
 
58
- describe("getAppData", () => {
59
- it("returns the app data", () => {
60
- const appData = getAppData();
61
- expect(appData).toHaveProperty("accountId", accountId);
62
- expect(appData).toHaveProperty("accountsAccountId", accountsAccountId);
63
- expect(appData).toHaveProperty("broadcasterId", broadcasterId);
64
- expect(appData).toHaveProperty("bundleIdentifier", bundleIdentifier);
53
+ describe("getAppData", () => {
54
+ it("returns the app data", () => {
55
+ const appData = getAppData();
56
+ expect(appData).toHaveProperty("accountId", accountId);
57
+ expect(appData).toHaveProperty("accountsAccountId", accountsAccountId);
58
+ expect(appData).toHaveProperty("broadcasterId", broadcasterId);
59
+ expect(appData).toHaveProperty("bundleIdentifier", bundleIdentifier);
60
+ });
65
61
  });
66
- });
67
62
 
68
- describe("getLegacyInitialProps", () => {
69
- it("returns the initial props", () => {
70
- const initialProps = getLegacyInitialProps();
63
+ describe("getLegacyInitialProps", () => {
64
+ it("returns the initial props", () => {
65
+ const initialProps = getLegacyInitialProps();
71
66
 
72
- expect(initialProps).toEqual(
73
- NativeModules.QuickBrickCommunicationModule.initialProps
74
- );
67
+ expect(initialProps).toEqual(
68
+ NativeModules.QuickBrickCommunicationModule.initialProps
69
+ );
70
+ });
75
71
  });
76
72
  });
@@ -1,10 +1,6 @@
1
- const mock_NativeModules = {
2
- Foo: jest.fn(),
3
- };
1
+ const { NativeModules } = require("react-native");
4
2
 
5
- jest.mock("react-native", () => ({
6
- NativeModules: mock_NativeModules,
7
- }));
3
+ NativeModules.Foo = jest.fn();
8
4
 
9
5
  jest.mock("../../logger", () => ({
10
6
  bridgeLogger: {
@@ -16,7 +12,7 @@ const {
16
12
  sendQuickBrickEvent,
17
13
  getAppData,
18
14
  getLegacyInitialProps,
19
- } = require("../index");
15
+ } = require("../");
20
16
 
21
17
  const eventName = "event";
22
18
  const payload = {};
@@ -24,6 +20,11 @@ const payload = {};
24
20
  const { bridgeLogger } = require("../../logger");
25
21
 
26
22
  describe("when QuickBrickCommunication Module is undefined", () => {
23
+ beforeEach(() => {
24
+ jest.unmock("react-native");
25
+ jest.resetModules();
26
+ });
27
+
27
28
  describe("sendQuickBrickEvent", () => {
28
29
  it("throws an error", () => {
29
30
  expect(() => sendQuickBrickEvent(eventName, payload)).toThrow();
@@ -33,11 +33,16 @@ export interface MultiSelectProvider {
33
33
 
34
34
  export class StorageMultiSelectProvider implements MultiSelectProvider {
35
35
  // TODO: Unsubscribe and remove when there is no listeners
36
- private static multiSelectProviders: Record<string, StorageMultiSelectProvider> = {};
36
+ private static multiSelectProviders: Record<
37
+ string,
38
+ StorageMultiSelectProvider
39
+ > = {};
37
40
 
38
- public static getProvider(keyNamespace:string): StorageMultiSelectProvider {
41
+ public static getProvider(keyNamespace: string): StorageMultiSelectProvider {
39
42
  if (!this.multiSelectProviders[keyNamespace]) {
40
- this.multiSelectProviders[keyNamespace] = new StorageMultiSelectProvider(keyNamespace);
43
+ this.multiSelectProviders[keyNamespace] = new StorageMultiSelectProvider(
44
+ keyNamespace
45
+ );
41
46
  }
42
47
 
43
48
  return this.multiSelectProviders[keyNamespace];
@@ -45,8 +50,8 @@ export class StorageMultiSelectProvider implements MultiSelectProvider {
45
50
 
46
51
  private itemSubject: BehaviorSubject<string[] | null>;
47
52
 
48
- private readonly key:string
49
- private readonly namespace:string;
53
+ private readonly key: string;
54
+ private readonly namespace: string;
50
55
 
51
56
  private constructor(keyNamespace: string) {
52
57
  const { namespace, key } = getNamespaceAndKey(keyNamespace);
@@ -65,10 +70,13 @@ export class StorageMultiSelectProvider implements MultiSelectProvider {
65
70
  log_debug("StorageMultiSelectProvider: Initializing");
66
71
  }
67
72
 
68
- private reloadItems = async ({ value }:StorageListenerArgs) => {
73
+ private reloadItems = async ({ value }: StorageListenerArgs) => {
69
74
  const selectedItems = value ? value.split(",") : [];
70
75
 
71
- log_debug(`reloadItems: request to reload items for value: ${value}`, selectedItems);
76
+ log_debug(
77
+ `reloadItems: request to reload items for value: ${value}`,
78
+ selectedItems
79
+ );
72
80
 
73
81
  this.itemSubject.next(selectedItems);
74
82
  };
@@ -76,7 +84,10 @@ export class StorageMultiSelectProvider implements MultiSelectProvider {
76
84
  public getObservable = (): BehaviorSubject<string[]> => this.itemSubject;
77
85
 
78
86
  private async getSetOfCurrentItems() {
79
- const currentResult: string = await localStorage.getItem(this.key, this.namespace);
87
+ const currentResult: string = await localStorage.getItem(
88
+ this.key,
89
+ this.namespace
90
+ );
80
91
 
81
92
  return new Set(currentResult ? currentResult.split(",") : []);
82
93
  }
@@ -89,49 +100,61 @@ export class StorageMultiSelectProvider implements MultiSelectProvider {
89
100
  this.itemSubject.next(arrayOfItems);
90
101
  }
91
102
 
92
- public addItem = async(item: string): Promise<void> => {
103
+ public addItem = async (item: string): Promise<void> => {
93
104
  const currentItems = await this.getSetOfCurrentItems();
94
105
  currentItems.add(item);
95
106
  log_debug(`addItem: Adding new item: ${item}`);
96
107
 
97
108
  await this.updateItemsAndNotifyObservers(currentItems);
98
- }
109
+ };
99
110
 
100
- public addItems = async(items: string[]): Promise<void> => {
111
+ public addItems = async (items: string[]): Promise<void> => {
101
112
  const currentItems = await this.getSetOfCurrentItems();
102
113
 
103
114
  items.forEach((item) => currentItems.add(item));
104
115
 
105
- log_debug(`addItems: Adding new items: ${items.join(",")}, current items: ${Array.from(currentItems).join(",")}`);
116
+ log_debug(
117
+ `addItems: Adding new items: ${items.join(
118
+ ","
119
+ )}, current items: ${Array.from(currentItems).join(",")}`
120
+ );
106
121
 
107
122
  await this.updateItemsAndNotifyObservers(currentItems);
108
- }
123
+ };
109
124
 
110
- public removeItem = async(item: string): Promise<void> => {
125
+ public removeItem = async (item: string): Promise<void> => {
111
126
  const currentItems = await this.getSetOfCurrentItems();
112
127
  currentItems.delete(item);
113
128
 
114
- log_debug(`removeItem: Removing item: ${item}, current items: ${Array.from(currentItems).join(",")}`);
129
+ log_debug(
130
+ `removeItem: Removing item: ${item}, current items: ${Array.from(
131
+ currentItems
132
+ ).join(",")}`
133
+ );
115
134
 
116
135
  await this.updateItemsAndNotifyObservers(currentItems);
117
- }
136
+ };
118
137
 
119
138
  public removeItems = async (items: string[]): Promise<void> => {
120
139
  const currentItems = await this.getSetOfCurrentItems();
121
140
 
122
141
  items.forEach((item) => currentItems.delete(item));
123
142
 
124
- log_debug(`removeItems: Removing items: ${items.join(",")}, current items: ${Array.from(currentItems).join(",")}`);
143
+ log_debug(
144
+ `removeItems: Removing items: ${items.join(
145
+ ","
146
+ )}, current items: ${Array.from(currentItems).join(",")}`
147
+ );
125
148
 
126
149
  await this.updateItemsAndNotifyObservers(currentItems);
127
- }
150
+ };
128
151
 
129
152
  public removeAllItems = async (): Promise<void> => {
130
153
  await localStorage.removeItem(this.key, this.namespace);
131
154
  log_debug(`removeAllItems: Removing all items, current items: ${[]}`);
132
155
 
133
156
  this.itemSubject.next([]);
134
- }
157
+ };
135
158
 
136
159
  public getSelectedAsync = async (): Promise<string[]> => {
137
160
  const value = await localStorage.getItem(this.key, this.namespace);
@@ -139,15 +162,15 @@ export class StorageMultiSelectProvider implements MultiSelectProvider {
139
162
  this.itemSubject.next(selectedItems);
140
163
 
141
164
  return selectedItems;
142
- }
165
+ };
143
166
 
144
167
  public getSelectedItems = (): string[] => {
145
168
  return this.itemSubject.getValue();
146
- }
169
+ };
147
170
 
148
171
  setSelectedItems = async (items: string[]): Promise<void> => {
149
172
  log_debug(`setSelectedItems: Setting selected items: ${items.join(",")}`);
150
173
 
151
174
  await this.updateItemsAndNotifyObservers(new Set(items));
152
- }
175
+ };
153
176
  }
@@ -1,25 +1,25 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`localStorage - getAllItems throws if an error happen on native side 1`] = `"An error occured while getting an item from native storage: namespace not found"`;
3
+ exports[`localStorage getAllItems throws if an error happen on native side 1`] = `"An error occured while getting an item from native storage: namespace not found"`;
4
4
 
5
- exports[`localStorage - getItem throws if key is null 1`] = `"Requested key is null or undefined"`;
5
+ exports[`localStorage getItem throws if key is null 1`] = `"Requested key is null or undefined"`;
6
6
 
7
- exports[`localStorage - getItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
7
+ exports[`localStorage getItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
8
8
 
9
- exports[`localStorage - getItem throws if there is an error on the native side 1`] = `"An error occured while getting an item from native storage: failed to get item"`;
9
+ exports[`localStorage getItem throws if there is an error on the native side 1`] = `"An error occured while getting an item from native storage: failed to get item"`;
10
10
 
11
- exports[`localStorage - removeItem throws if a native error is thrown 1`] = `"An error occured while removing an item from native storage: failed to remove item"`;
11
+ exports[`localStorage removeItem throws if a native error is thrown 1`] = `"An error occured while removing an item from native storage: failed to remove item"`;
12
12
 
13
- exports[`localStorage - removeItem throws if key is null 1`] = `"Requested key is null or undefined"`;
13
+ exports[`localStorage removeItem throws if key is null 1`] = `"Requested key is null or undefined"`;
14
14
 
15
- exports[`localStorage - removeItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
15
+ exports[`localStorage removeItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
16
16
 
17
- exports[`localStorage - setItem throws if key is null 1`] = `"Requested key is null or undefined"`;
17
+ exports[`localStorage setItem throws if key is null 1`] = `"Requested key is null or undefined"`;
18
18
 
19
- exports[`localStorage - setItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
19
+ exports[`localStorage setItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
20
20
 
21
- exports[`localStorage - setItem throws if there is an error in the native module 1`] = `"An error occured while setting an item in native storage: failed to set item"`;
21
+ exports[`localStorage setItem throws if there is an error in the native module 1`] = `"An error occured while setting an item in native storage: failed to set item"`;
22
22
 
23
- exports[`localStorage - setItem throws if value is null 1`] = `"Value to set in storage cannot be null or undefined"`;
23
+ exports[`localStorage setItem throws if value is null 1`] = `"Value to set in storage cannot be null or undefined"`;
24
24
 
25
- exports[`localStorage - setItem throws if value is undefined 1`] = `"Value to set in storage cannot be null or undefined"`;
25
+ exports[`localStorage setItem throws if value is undefined 1`] = `"Value to set in storage cannot be null or undefined"`;
@@ -1,25 +1,25 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`sessionStorage - getAllItems throws if an error happen on native side 1`] = `"An error occured while getting an item from native storage: namespace not found"`;
3
+ exports[`sessionStorage getAllItems throws if an error happen on native side 1`] = `"An error occured while getting an item from native storage: namespace not found"`;
4
4
 
5
- exports[`sessionStorage - getItem throws if key is null 1`] = `"Requested key is null or undefined"`;
5
+ exports[`sessionStorage getItem throws if key is null 1`] = `"Requested key is null or undefined"`;
6
6
 
7
- exports[`sessionStorage - getItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
7
+ exports[`sessionStorage getItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
8
8
 
9
- exports[`sessionStorage - getItem throws if there is an error on the native side 1`] = `"An error occured while getting an item from native storage: failed to get item"`;
9
+ exports[`sessionStorage getItem throws if there is an error on the native side 1`] = `"An error occured while getting an item from native storage: failed to get item"`;
10
10
 
11
- exports[`sessionStorage - removeItem throws if a native error is thrown 1`] = `"An error occured while removing an item from native storage: failed to remove item"`;
11
+ exports[`sessionStorage removeItem throws if a native error is thrown 1`] = `"An error occured while removing an item from native storage: failed to remove item"`;
12
12
 
13
- exports[`sessionStorage - removeItem throws if key is null 1`] = `"Requested key is null or undefined"`;
13
+ exports[`sessionStorage removeItem throws if key is null 1`] = `"Requested key is null or undefined"`;
14
14
 
15
- exports[`sessionStorage - removeItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
15
+ exports[`sessionStorage removeItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
16
16
 
17
- exports[`sessionStorage - setItem throws if key is null 1`] = `"Requested key is null or undefined"`;
17
+ exports[`sessionStorage setItem throws if key is null 1`] = `"Requested key is null or undefined"`;
18
18
 
19
- exports[`sessionStorage - setItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
19
+ exports[`sessionStorage setItem throws if key is undefined 1`] = `"Requested key is null or undefined"`;
20
20
 
21
- exports[`sessionStorage - setItem throws if there is an error in the native module 1`] = `"An error occured while setting an item in native storage: failed to set item"`;
21
+ exports[`sessionStorage setItem throws if there is an error in the native module 1`] = `"An error occured while setting an item in native storage: failed to set item"`;
22
22
 
23
- exports[`sessionStorage - setItem throws if value is null 1`] = `"Value to set in storage cannot be null or undefined"`;
23
+ exports[`sessionStorage setItem throws if value is null 1`] = `"Value to set in storage cannot be null or undefined"`;
24
24
 
25
- exports[`sessionStorage - setItem throws if value is undefined 1`] = `"Value to set in storage cannot be null or undefined"`;
25
+ exports[`sessionStorage setItem throws if value is undefined 1`] = `"Value to set in storage cannot be null or undefined"`;