Skip to content

Commit a0b334b

Browse files
committed
Modify README
* combined mockjs * fix require mocks directory
1 parent 1b9c99e commit a0b334b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ No fetch mock could be used easily for react-native.
88
So, I create one by myself.
99

1010
## Roadmap
11-
- [ ] Combined with Mock.js
11+
- [x] Combined with Mock.js
1212

1313
## Usage
1414
```
1515
import FetchMock from 'react-native-fetch-mock';
1616
1717
if (__dev__) {
18-
global.fetch = FetchMock('path/to/mocks/directory');
18+
global.fetch = FetchMock(require('path/to/mocks/directory'));
1919
}
2020
2121
// if __dev__ is true, it will back the data you defined in mock directory

0 commit comments

Comments
 (0)