[tests] misc
This commit is contained in:
parent
380720c5fe
commit
c1abfcf002
|
@ -14,27 +14,7 @@
|
|||
|
||||
* Run `npm install`.
|
||||
|
||||
## To test Release build of your app
|
||||
|
||||
### Step 2: Build
|
||||
|
||||
* Build the demo project
|
||||
|
||||
```sh
|
||||
detox build --configuration ios.sim.release
|
||||
```
|
||||
|
||||
### Step 3: Test
|
||||
|
||||
* Run tests on the demo project
|
||||
|
||||
```sh
|
||||
detox test --configuration ios.sim.release
|
||||
```
|
||||
|
||||
This action will open a new simulator and run the tests on it.
|
||||
|
||||
## To test Debug build of your app
|
||||
## To test build of your app
|
||||
|
||||
### Step 2: Build
|
||||
|
||||
|
@ -84,7 +64,9 @@ Error: Failed to parse properties from /Users/mike/.android/avd/Actually_THIS_on
|
|||
|
||||
#### Running specific tests
|
||||
|
||||
Add a `--grep` to e2e/mocha.opts file, e.g. `--grep auth` for all tests that have auth in the file path or tests descriptions.
|
||||
Mocha supports the `.only` syntax, e.g. instead of `describe(...) || it(...)` you can use `describe.only(...) || it.only(...)` to only run that specific context or test.
|
||||
|
||||
Another way to do this is via adding a `--grep` option to e2e/mocha.opts file, e.g. `--grep auth` for all tests that have auth in the file path or tests descriptions.
|
||||
|
||||
#### Running Node debugger
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ class Root extends Component {
|
|||
|
||||
bridge.setBridgeProperty('root', this);
|
||||
bridge.setBridgeProperty('module', firebase);
|
||||
bridge.setBridgeProperty('require', require);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
@ -4,6 +4,28 @@ describe('firestore()', () => {
|
|||
await TestHelpers.firestore.resetTestCollectionDoc();
|
||||
});
|
||||
|
||||
describe('id', () => {
|
||||
it('returns a string document id', async () => {
|
||||
const { testCollectionDoc, COL_DOC_1_ID } = TestHelpers.firestore;
|
||||
const snapshot = await testCollectionDoc().get();
|
||||
snapshot.id.should.be.a.String();
|
||||
snapshot.id.should.equal(COL_DOC_1_ID);
|
||||
});
|
||||
});
|
||||
|
||||
describe.only('ref', () => {
|
||||
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'
|
||||
// )
|
||||
// );
|
||||
});
|
||||
});
|
||||
|
||||
describe('get()', () => {
|
||||
it('using a dot notated path string', async () => {
|
||||
const { testCollectionDoc } = TestHelpers.firestore;
|
||||
|
|
Loading…
Reference in New Issue