Explorar el Código

Change test code.

Ben Hsieh hace 8 años
padre
commit
c67f368d00
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 2
    1
      test/test-0.5.x.js
  2. 1
    2
      test/test-init.js

+ 2
- 1
test/test-0.5.x.js Ver fichero

35
     })
35
     })
36
     .fetch('GET', `${TEST_SERVER_URL}/public/github2.jpg`)
36
     .fetch('GET', `${TEST_SERVER_URL}/public/github2.jpg`)
37
     .then((resp) => {
37
     .then((resp) => {
38
+      console.log(resp.path())
38
       tmpFilePath = resp.path()
39
       tmpFilePath = resp.path()
39
       report(<Info key={`image from ${tmpFilePath}`}>
40
       report(<Info key={`image from ${tmpFilePath}`}>
40
         <Image
41
         <Image
158
     })
159
     })
159
     .fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
160
     .fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
160
   let p3 = RNFetchBlob.config({
161
   let p3 = RNFetchBlob.config({
161
-      path : sysDirs.DocumentDir + '/session-test.png'
162
+      path : sysDirs.DocumentDir + '/session-test'+Date.now()+'.png'
162
     })
163
     })
163
     .fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
164
     .fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
164
 
165
 

+ 1
- 2
test/test-init.js Ver fichero

18
 // test environment variables
18
 // test environment variables
19
 
19
 
20
 prop('FILENAME', `${Platform.OS}-0.5.0-${Date.now()}.png`)
20
 prop('FILENAME', `${Platform.OS}-0.5.0-${Date.now()}.png`)
21
-prop('TEST_SERVER_URL', 'http://192.168.16.70:8123')
21
+prop('TEST_SERVER_URL', 'http://localhost:8123')
22
 prop('DROPBOX_TOKEN', 'fsXcpmKPrHgAAAAAAAAAoXZhcXYWdgLpQMan6Tb_bzJ237DXhgQSev12hA-gUXt4')
22
 prop('DROPBOX_TOKEN', 'fsXcpmKPrHgAAAAAAAAAoXZhcXYWdgLpQMan6Tb_bzJ237DXhgQSev12hA-gUXt4')
23
 prop('styles', {
23
 prop('styles', {
24
   image : {
24
   image : {
39
       Authorization : 'Bearer abde123eqweje'
39
       Authorization : 'Bearer abde123eqweje'
40
     })
40
     })
41
     .then((resp) => {
41
     .then((resp) => {
42
-
43
       RNTest.prop('image', resp.base64())
42
       RNTest.prop('image', resp.base64())
44
       report(
43
       report(
45
         <Info key="Response image">
44
         <Info key="Response image">