Ben Hsieh 8 anni fa
parent
commit
e5364c61e5
2 ha cambiato i file con 19 aggiunte e 5 eliminazioni
  1. 14
    0
      test/test-android.js
  2. 5
    5
      test/test-init.js

+ 14
- 0
test/test-android.js Vedi File

@@ -91,3 +91,17 @@ describe('MediaScanner tests ', (report, done) => {
91 91
   })
92 92
 
93 93
 })
94
+
95
+describe('android download manager', (report, done) => {
96
+  RNFetchBlob.config({
97
+    addAndroidDownloads : {
98
+      useDownloadManager : true,
99
+      title : 'RNFetchBlob test download success',
100
+      description : `File description added by RNFetchblob`,
101
+      mediaScannable : true,
102
+      mime : "image/png",
103
+      notification : true
104
+    }
105
+  })
106
+  .fetch('GET', `${TEST_SERVER_URL}/public/beethoven.mp3`)
107
+})

+ 5
- 5
test/test-init.js Vedi File

@@ -17,7 +17,7 @@ const { Assert, Comparer, Info, describe, prop } = RNTest
17 17
 
18 18
 // test environment variables
19 19
 
20
-prop('FILENAME', `${Platform.OS}-0.5.0-${Date.now()}.png`)
20
+prop('FILENAME', `${Platform.OS}-0.6.0-${Date.now()}.png`)
21 21
 prop('TEST_SERVER_URL', 'http://localhost:8123')
22 22
 prop('DROPBOX_TOKEN', 'fsXcpmKPrHgAAAAAAAAAoXZhcXYWdgLpQMan6Tb_bzJ237DXhgQSev12hA-gUXt4')
23 23
 prop('styles', {
@@ -50,8 +50,8 @@ describe('GET image from server', (report, done) => {
50 50
     })
51 51
 })
52 52
 
53
-require('./test-0.1.x-0.4.x')
54
-require('./test-0.5.1')
55
-require('./test-0.5.2')
56
-require('./test-fs')
53
+// require('./test-0.1.x-0.4.x')
54
+// require('./test-0.5.1')
55
+// require('./test-0.5.2')
56
+// require('./test-fs')
57 57
 require('./test-android')