From b4cc1aa6be2e05ba371fdf309b8b95c42e45bc60 Mon Sep 17 00:00:00 2001 From: Davyd NRB <4661784+retyui@users.noreply.github.com> Date: Sun, 13 Sep 2026 21:01:14 +0200 Subject: [PATCH 1/2] Update Jest mock paths for AsyncStorage Updated Jest integration documentation to reflect changes in the module path for mocking AsyncStorage. --- docs/integrations/jest.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/integrations/jest.md b/docs/integrations/jest.md index 7759c00b..394f476e 100644 --- a/docs/integrations/jest.md +++ b/docs/integrations/jest.md @@ -32,7 +32,7 @@ __mocks__/@react-native-async-storage/async-storage.js With content: ```js -module.exports = require("@react-native-async-storage/async-storage/jest"); +module.exports = require("@react-native-async-storage/async-storage/src/jest/AsyncStorageMock"); ``` Jest resolves files under `__mocks__/` automatically when the module is imported, so no additional configuration is @@ -44,7 +44,7 @@ To mock the module for a specific test file, call `jest.mock` at the top of the ```js jest.mock("@react-native-async-storage/async-storage", () => - require("@react-native-async-storage/async-storage/jest") + require("@react-native-async-storage/async-storage/src/jest/AsyncStorageMock.ts") ); ``` @@ -55,7 +55,7 @@ The mock is a full in-memory implementation of the `AsyncStorage` interface. Add Example usage: ```ts -import { clearAllMockStorages } from "@react-native-async-storage/async-storage/jest"; +import { clearAllMockStorages } from "@react-native-async-storage/async-storage/src/jest/AsyncStorageMock"; beforeEach(() => { clearAllMockStorages(); From 71ffc00fac36ec88090a4a7256a9a120d56b93c9 Mon Sep 17 00:00:00 2001 From: Davyd NRB <4661784+retyui@users.noreply.github.com> Date: Sun, 13 Sep 2026 21:03:25 +0200 Subject: [PATCH 2/2] Correct AsyncStorageMock import path in jest.md Fix path to AsyncStorageMock in jest documentation. --- docs/integrations/jest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/jest.md b/docs/integrations/jest.md index 394f476e..d6042e67 100644 --- a/docs/integrations/jest.md +++ b/docs/integrations/jest.md @@ -44,7 +44,7 @@ To mock the module for a specific test file, call `jest.mock` at the top of the ```js jest.mock("@react-native-async-storage/async-storage", () => - require("@react-native-async-storage/async-storage/src/jest/AsyncStorageMock.ts") + require("@react-native-async-storage/async-storage/src/jest/AsyncStorageMock") ); ```