0
21/05/2024 10:33 am
Topic starter
While running test cases, faced an issue related to AsyncStorage/LagacyStorage from StorageProvider.
[Please refer to the attached screenshot]
1 Answer
1
21/05/2024 10:42 am
Topic starter
Add the below code to the test-setup.js file of your relevant block.
jest.mock("../../framework/src/StorageProvider", () => ({ get: jest .fn() .mockImplementationOnce((key) => { if (key === "token") return "0"; return "token"; }) .mockImplementation(() => null), set: jest.fn(), }));