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

Commit 4a99eb5

Browse files
committed
Add test case
1 parent 2e61ac4 commit 4a99eb5

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

test/test-0.10.2.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import RNTest from './react-native-testkit/'
22
import React from 'react'
3+
import _ from 'lodash'
34
import RNFetchBlob from 'react-native-fetch-blob'
45
import {
56
StyleSheet,
@@ -21,7 +22,7 @@ const JSONStream = RNFetchBlob.JSONStream
2122
const fs = RNFetchBlob.fs
2223
const { Assert, Comparer, Info, prop } = RNTest
2324
const describe = RNTest.config({
24-
group : '0.10.1',
25+
group : '0.10.2',
2526
run : true,
2627
expand : true,
2728
timeout : 20000,
@@ -62,6 +63,19 @@ describe('#230 add and option for setting if the request follow redirect or not'
6263

6364
})
6465

66+
describe('#240 openDocument does not support file URI', (report, done) => {
67+
RNFetchBlob
68+
.config({ fileCache : true })
69+
.fetch('GET', `${TEST_SERVER_URL}/public/github.png`)
70+
.then((res) => {
71+
RNFetchBlob.ios.openDocument(res.path())
72+
.then(() => {
73+
done();
74+
})
75+
})
76+
77+
})
78+
6579
describe('#241 null header silent failed issue', (report, done) => {
6680

6781
RNFetchBlob.fetch('GET', `${TEST_SERVER_URL}/public/github.png`, {

test/test-init.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import RNTest from './react-native-testkit/'
22
import React from 'react'
3+
import _ from 'lodash'
34
import RNFetchBlob from 'react-native-fetch-blob'
45

56
import {
@@ -20,8 +21,8 @@ const { Assert, Comparer, Info, prop } = RNTest
2021
prop('FILENAME', `${Platform.OS}-0.10.0-${Date.now()}.png`)
2122
prop('TEST_SERVER_URL', 'http://localhost:8123')
2223
prop('TEST_SERVER_URL_SSL', 'https://localhost:8124')
23-
// prop('TEST_SERVER_URL', 'http://192.168.17.185:8123')
24-
// prop('TEST_SERVER_URL_SSL', 'https://192.168.17.185:8124')
24+
// prop('TEST_SERVER_URL', 'http://192.168.0.13:8123')
25+
// prop('TEST_SERVER_URL_SSL', 'https://192.168.0.13:8124')
2526
prop('DROPBOX_TOKEN', 'fsXcpmKPrHgAAAAAAAAAoXZhcXYWdgLpQMan6Tb_bzJ237DXhgQSev12hA-gUXt4')
2627
prop('styles', {
2728
image : {

0 commit comments

Comments
 (0)