Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 58ace5a

Browse files
committed
Add test case and fix test server API for #154
1 parent 443b575 commit 58ace5a

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test-server/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ app.all('/cookie', (req, res) => {
240240

241241
app.all('/err-body', (req, res) => {
242242
res.status(400)
243-
res.write({ data : Date.now() })
243+
res.write(JSON.stringify({ data : Date.now() }))
244244
res.end()
245245
})
246246

test/test-0.10.0.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ let begin = Date.now()
8989
//
9090
// })
9191

92+
describe('#154 Allow passing unparsed response body to error handler ', (report, done) =>{
93+
94+
RNFetchBlob.fetch('get', `${TEST_SERVER_URL}/err-body`)
95+
.then((res) => {
96+
console.log(res)
97+
})
98+
.catch((err) => {
99+
console.log(err)
100+
})
101+
102+
})
92103

93104
describe('cookie test', (report, done) => {
94105

0 commit comments

Comments
 (0)