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