Bez popisu

test-0.6.2.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. CameraRoll,
  10. Platform,
  11. Dimensions,
  12. Image,
  13. } from 'react-native';
  14. const fs = RNFetchBlob.fs
  15. const { Assert, Comparer, Info, prop } = RNTest
  16. const describe = RNTest.config({
  17. group : '0.6.2',
  18. run : true,
  19. expand : true,
  20. timeout : 12000,
  21. })
  22. const { TEST_SERVER_URL_SSL, FILENAME, DROPBOX_TOKEN, styles } = prop()
  23. const dirs = RNFetchBlob.fs.dirs
  24. let prefix = ((Platform.OS === 'android') ? 'file://' : '')
  25. CameraRoll.getPhotos({first : 10}, function(resp){console.log(resp)}, (err)=>{console.log(err)})
  26. // .then((resp) => {
  27. // console.log(resp)
  28. // })
  29. // .catch((err) => {
  30. // console.log(err)
  31. // })
  32. describe('access file in assets', (report, done) => {
  33. CameraRoll.getPhotos({first : 10})
  34. .then((resp) => {
  35. report(<Info key="items">
  36. <Text>{JSON.stringify(resp)}</Text>
  37. </Info>)
  38. })
  39. .catch((err) => {
  40. console.log(err)
  41. report(<Info key="err">
  42. <Text>{JSON.stringify(err)}</Text>
  43. </Info>)
  44. })
  45. })