Browse Source

Add 0.9.4 test cases

Ben Hsieh 8 years ago
parent
commit
d766c7c05c
1 changed files with 2 additions and 6 deletions
  1. 2
    6
      test/test-0.9.4.js

+ 2
- 6
test/test-0.9.4.js View File

13
 
13
 
14
 window.XMLHttpRequest = RNFetchBlob.polyfill.XMLHttpRequest
14
 window.XMLHttpRequest = RNFetchBlob.polyfill.XMLHttpRequest
15
 window.Blob = RNFetchBlob.polyfill.Blob
15
 window.Blob = RNFetchBlob.polyfill.Blob
16
-// window.fetch = new RNFetchBlob.polyfill.Fetch({
17
-//   auto : true,
18
-//   binaryContentTypes : ['image/', 'video/', 'audio/']
19
-// }).build()
20
 
16
 
21
 const fs = RNFetchBlob.fs
17
 const fs = RNFetchBlob.fs
22
 const { Assert, Comparer, Info, prop } = RNTest
18
 const { Assert, Comparer, Info, prop } = RNTest
54
 
50
 
55
   fetch('https://rnfb-test-app.firebaseapp.com/6m-json.json')
51
   fetch('https://rnfb-test-app.firebaseapp.com/6m-json.json')
56
     .then((res) => {
52
     .then((res) => {
57
-      console.log('##',res)
58
       console.log('## converted')
53
       console.log('## converted')
59
       return res.json()
54
       return res.json()
60
     })
55
     })
61
     .then((data) => {
56
     .then((data) => {
62
-      console.log(data)
57
+      // console.log(data)
58
+      report(<Assert key="fetch request success" expect={20000} actual={data.total}/>)
63
       done()
59
       done()
64
     })
60
     })
65
 
61