Skip to content

Commit 5576f33

Browse files
committed
fix dist not build of 0.6.0
1 parent 208cfd7 commit 5576f33

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-fetch-mock",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "fetch mock for react-native",
55
"main": "index.js",
66
"scripts": {

test/index.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import expect from 'expect.js';
33
import FetchMock, { Mock } from '../src';
44

55
const fetch = new FetchMock(require('../__mocks__'), {
6-
delay: 2000, // delay 5s
6+
delay: 200, // delay 200ms
77
fetch: require('isomorphic-fetch'),
88
exclude: [
99
'https://www.amazon.com',
@@ -173,23 +173,23 @@ describe('test fetch mock', () => {
173173
it('global delay', async () => {
174174
const start = new Date().getTime();
175175
await fetch('/api/users');
176-
expect(new Date().getTime() - start).to.greaterThan(2000);
176+
expect(new Date().getTime() - start).to.greaterThan(199).lessThan(210);
177177
}).timeout(20000);
178178

179179
it('method delay 30ms', async () => {
180180
const start = new Date().getTime();
181181
await fetch('/api/users', {
182182
delay: 30,
183183
});
184-
expect(new Date().getTime() - start).to.greaterThan(30);
184+
expect(new Date().getTime() - start).to.greaterThan(29).lessThan(40);
185185
}).timeout(20000);
186186

187187
it('method delay 3000ms', async () => {
188188
const start = new Date().getTime();
189189
await fetch('/api/users', {
190190
delay: 3000,
191191
});
192-
expect(new Date().getTime() - start).to.greaterThan(3000);
192+
expect(new Date().getTime() - start).to.greaterThan(2999).lessThan(3100);
193193
}).timeout(20000);
194194

195195
});

0 commit comments

Comments
 (0)