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

Commit 6a93277

Browse files
committed
Change test script and test server
1 parent 7edc5c8 commit 6a93277

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

test-server/server.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ app.use(function(req,res,next){
4646
next()
4747
})
4848

49+
app.use('/upload-form', function(req, res, next) {
50+
console.log(req.headers)
51+
// req.on('data', (chunk) => {
52+
// console.log(String(chunk,'utf8'))
53+
// })
54+
// req.on('end', () => {
55+
next()
56+
// })
57+
})
58+
4959
app.use(upload.any())
5060
app.use('/public', express.static('./public'))
5161
// for redirect test

test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#!/bin/bash
2+
3+
set -e
4+
15
TEST_APP_NAME='RNFetchBlobTest'
26
TEST_APP_PATH="$(pwd)/${TEST_APP_NAME}"
37
TARGET='android'
@@ -25,7 +29,6 @@ fi
2529
# Create new rn project
2630
if [ "$#" -eq 1 ]; then
2731
echo 'creating test app RNFetchBlobTest ..'
28-
rm -rf "${TEST_APP_NAME}"
2932
react-native init "${TEST_APP_NAME}"
3033
fi
3134
# copy js files to test app folder

test/test-init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const { Assert, Comparer, Info, describe, prop } = RNTest
1818
// test environment variables
1919

2020
prop('FILENAME', `${Platform.OS}-0.5.0-${Date.now()}.png`)
21-
prop('TEST_SERVER_URL', 'http://localhost:8123')
22-
prop('TEST_SERVER_URL_SSL', 'https://localhost:8124')
21+
prop('TEST_SERVER_URL', 'http://192.168.16.70:8123')
22+
prop('TEST_SERVER_URL_SSL', 'https://192.168.16.70:8124')
2323
prop('DROPBOX_TOKEN', 'fsXcpmKPrHgAAAAAAAAAoXZhcXYWdgLpQMan6Tb_bzJ237DXhgQSev12hA-gUXt4')
2424
prop('styles', {
2525
image : {

0 commit comments

Comments
 (0)