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

Commit a510c11

Browse files
committed
Add test case
1 parent c8d178a commit a510c11

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test-0.10.0.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Linking,
1010
Platform,
1111
Dimensions,
12+
AsyncStorage,
1213
Image,
1314
} from 'react-native';
1415
const JSONStream = RNFetchBlob.JSONStream
@@ -69,5 +70,18 @@ describe('json stream via fs', (report, done) => {
6970
done()
7071
})
7172
})
73+
})
74+
75+
describe('issue #102', (report, done) => {
76+
77+
RNFetchBlob.config({ fileCache: true })
78+
.fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
79+
.then((res) => {
80+
return RNFetchBlob.fetch('POST', `${TEST_SERVER_URL}/upload-form`, {},
81+
[{ name : String(1), data : RNFetchBlob.wrap(res.path()), filename: '#102-test-image.png' }])
82+
})
83+
.then((res) => {
84+
console.log(res.text())
85+
})
7286

7387
})

0 commit comments

Comments
 (0)