No Description

test-0.10.0.js 990B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import RNTest from './react-native-testkit/'
  2. import React from 'react'
  3. import RNFetchBlob from 'react-native-fetch-blob'
  4. import {
  5. StyleSheet,
  6. Text,
  7. View,
  8. ScrollView,
  9. Platform,
  10. Dimensions,
  11. Image,
  12. } from 'react-native';
  13. const JSONStream = RNFetchBlob.JSONStream
  14. const fs = RNFetchBlob.fs
  15. const { Assert, Comparer, Info, prop } = RNTest
  16. const describe = RNTest.config({
  17. group : '0.10.0',
  18. run : true,
  19. expand : true,
  20. timeout : 20000,
  21. })
  22. const { TEST_SERVER_URL, TEST_SERVER_URL_SSL, FILENAME, DROPBOX_TOKEN, styles } = prop()
  23. const dirs = RNFetchBlob.fs.dirs
  24. let prefix = ((Platform.OS === 'android') ? 'file://' : '')
  25. let begin = Date.now()
  26. describe('oboe test', (report, done) => {
  27. let count = 0
  28. JSONStream(`${TEST_SERVER_URL}/public/json-dummy.json`).node('name', (name) => {
  29. count++
  30. if(Date.now() - begin < 100)
  31. return
  32. begin = Date.now()
  33. report(<Info key="report" uid="100">
  34. <Text>{count} records</Text>
  35. </Info>)
  36. done()
  37. })
  38. })