tests: jest testing migration crashlytics (#3588)

* tests(crashlytics): migrate JS only tests to Jest

* Converted crashlytics tests to ts
This commit is contained in:
Darren Ackers
2020-05-05 22:38:29 +01:00
committed by GitHub
parent 35285f1655
commit e0082abd64
3 changed files with 12 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ jest.doMock('react-native', () => {
],
},
RNFBPerfModule: {},
RNFBCrashlyticsModule: {},
},
},
ReactNative,

View File

@@ -0,0 +1,11 @@
import { firebase } from '../lib';
describe('Crashlytics', () => {
describe('namespace', () => {
it('accessible from firebase.app()', () => {
const app = firebase.app();
expect(app.crashlytics).toBeDefined();
expect(app.crashlytics().app).toEqual(app);
});
});
});

View File

@@ -16,14 +16,6 @@
*/
describe('crashlytics()', () => {
describe('namespace', () => {
it('accessible from firebase.app()', () => {
const app = firebase.app();
should.exist(app.crashlytics);
app.crashlytics().app.should.equal(app);
});
});
// Run locally only - flakey on CI
xdescribe('crash()', () => {
it('crashes the app', async () => {