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

Commit 27c8d8d

Browse files
committed
Add test cases #108
1 parent 91aa192 commit 27c8d8d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test-0.10.0.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,18 @@ describe('json stream via fs', (report, done) => {
7373
})
7474

7575
describe('issue #102', (report, done) => {
76-
77-
RNFetchBlob.config({ fileCache: true })
76+
let tmp = null
77+
RNFetchBlob.config({ fileCache: true, appendExt : 'png' })
7878
.fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
7979
.then((res) => {
80+
tmp = res
81+
RNFetchBlob.ios.previewDocument('file://' + res.path(), 'itms-books:')
8082
return RNFetchBlob.fetch('POST', `${TEST_SERVER_URL}/upload-form`, {},
8183
[{ name : String(1), data : RNFetchBlob.wrap(res.path()), filename: '#102-test-image.png' }])
8284
})
83-
.then((res) => {
84-
console.log(res.text())
85+
.then((res) => tmp.flush())
86+
.then(() => {
87+
done()
8588
})
8689

8790
})

0 commit comments

Comments
 (0)