Skip to content

Commit fc8da12

Browse files
committed
Revert ".then(fetchMock.restore) -> .finally(fetchMock.restore)"
This reverts commit 9741661.
1 parent e818eb1 commit fc8da12

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/http.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe('http', () => {
252252
return http('http://example.com', req).then((response) => {
253253
expect(response.url).toEqual('http://example.com?anotherOne=one,two&evenMore=hi&bar=1%202%203')
254254
expect(response.status).toEqual(200)
255-
}).finally(fetchMock.restore)
255+
}).then(fetchMock.restore)
256256
})
257257
})
258258

@@ -268,7 +268,7 @@ describe('http', () => {
268268
return serializeRes(_res, 'https://swagger.io')
269269
}).then((resSerialize) => {
270270
expect(resSerialize.headers).toEqual({authorization: ['Basic hoop-la', 'Advanced hoop-la']})
271-
}).finally(fetchMock.restore)
271+
}).then(fetchMock.restore)
272272
})
273273

274274
it('should set .text and .data to body Blob or Buffer for binary response', function () {
@@ -290,7 +290,7 @@ describe('http', () => {
290290
expect(resSerialize.data).toBeA(Buffer)
291291
expect(resSerialize.data).toEqual(new Buffer(body))
292292
}
293-
}).finally(fetchMock.restore)
293+
}).then(fetchMock.restore)
294294
})
295295

296296
it('should set .text and .data to body string for text response', function () {
@@ -306,7 +306,7 @@ describe('http', () => {
306306
}).then((resSerialize) => {
307307
expect(resSerialize.data).toBe(resSerialize.text)
308308
expect(resSerialize.data).toBe(body)
309-
}).finally(fetchMock.restore)
309+
}).then(fetchMock.restore)
310310
})
311311
})
312312

0 commit comments

Comments
 (0)