[tests] misc switch to using the new bridge.require() utility
This commit is contained in:
parent
feb1315f84
commit
01ed77904f
|
@ -1,11 +1,4 @@
|
||||||
/**
|
/* eslint-disable import/extensions,import/no-unresolved */
|
||||||
* Sample React Native App
|
|
||||||
* https://github.com/facebook/react-native
|
|
||||||
* @flow
|
|
||||||
*/
|
|
||||||
|
|
||||||
// must import before all else
|
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { AppRegistry, Text, View } from 'react-native';
|
import { AppRegistry, Text, View } from 'react-native';
|
||||||
|
|
||||||
|
@ -25,7 +18,6 @@ class Root extends Component {
|
||||||
|
|
||||||
bridge.setBridgeProperty('root', this);
|
bridge.setBridgeProperty('root', this);
|
||||||
bridge.setBridgeProperty('module', firebase);
|
bridge.setBridgeProperty('module', firebase);
|
||||||
bridge.setBridgeProperty('require', require);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -17,12 +17,10 @@ describe('firestore()', () => {
|
||||||
it('returns a DocumentReference', async () => {
|
it('returns a DocumentReference', async () => {
|
||||||
const { testCollectionDoc } = TestHelpers.firestore;
|
const { testCollectionDoc } = TestHelpers.firestore;
|
||||||
const snapshot = await testCollectionDoc().get();
|
const snapshot = await testCollectionDoc().get();
|
||||||
// console.dir(bridge.context.require.getModules());
|
const DocumentReference = bridge.require(
|
||||||
// snapshot.ref.should.be.an.instanceOf(
|
'react-native-firebase/dist/modules/firestore/DocumentReference'
|
||||||
// bridge.require(
|
);
|
||||||
// 'react-native-firebase/dist/modules/firestore/DocumentReference.js'
|
snapshot.ref.should.be.an.instanceOf(DocumentReference);
|
||||||
// )
|
|
||||||
// );
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"ios:pod:install": "cd ios && rm -rf ReactNativeFirebaseDemo.xcworkspace && pod install && cd .."
|
"ios:pod:install": "cd ios && rm -rf ReactNativeFirebaseDemo.xcworkspace && pod install && cd .."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bridge": "^0.2.3",
|
"bridge": "^0.2.4",
|
||||||
"detox": "^7.2.0",
|
"detox": "^7.2.0",
|
||||||
"escape-string-regexp": "^1.0.5",
|
"escape-string-regexp": "^1.0.5",
|
||||||
"fbjs": "^0.8.16",
|
"fbjs": "^0.8.16",
|
||||||
|
|
Loading…
Reference in New Issue