Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/integrations/jest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
);
```

Expand All @@ -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();
Expand Down