[crashlytics] Move to top level crashlytics namespace

This commit is contained in:
Chris Bianca
2018-04-03 16:51:05 +01:00
parent 90d35ef6e9
commit b21e7d0eab
9 changed files with 35 additions and 57 deletions

View File

@@ -2,45 +2,43 @@ export default function addTests({ describe, it, firebase }) {
describe('Crashlytics', () => {
it('log: it should log without error', () =>
new Promise(resolve => {
firebase.native.fabric.crashlytics().log('Test log');
firebase.native.crashlytics().log('Test log');
resolve();
}));
it('recordError: it should record an error without error', () =>
new Promise(resolve => {
firebase.native.fabric.crashlytics().recordError(1234, 'Test error');
firebase.native.crashlytics().recordError(1234, 'Test error');
resolve();
}));
it('setBoolValue: it should set a boolean value without error', () =>
new Promise(resolve => {
firebase.native.fabric.crashlytics().setBoolValue('boolKey', true);
firebase.native.crashlytics().setBoolValue('boolKey', true);
resolve();
}));
it('setFloatValue: it should set a float value without error', () =>
new Promise(resolve => {
firebase.native.fabric.crashlytics().setFloatValue('floatKey', 1.23);
firebase.native.crashlytics().setFloatValue('floatKey', 1.23);
resolve();
}));
it('setIntValue: it should set an integer value without error', () =>
new Promise(resolve => {
firebase.native.fabric.crashlytics().setIntValue('intKey', 123);
firebase.native.crashlytics().setIntValue('intKey', 123);
resolve();
}));
it('setStringValue: it should set a string value without error', () =>
new Promise(resolve => {
firebase.native.fabric
.crashlytics()
.setStringValue('stringKey', 'test');
firebase.native.crashlytics().setStringValue('stringKey', 'test');
resolve();
}));
it('setUserIdentifier: it should set the user ID without error', () =>
new Promise(resolve => {
firebase.native.fabric.crashlytics().setUserIdentifier('1234');
firebase.native.crashlytics().setUserIdentifier('1234');
resolve();
}));
});

View File

@@ -2,11 +2,7 @@ import firebase from '../../firebase';
import TestSuite from '../../../lib/TestSuite';
import crashlyticsTests from './crashlyticsTests';
const suite = new TestSuite(
'Crashlytics',
'firebase.fabric.crashlytics()',
firebase
);
const suite = new TestSuite('Crashlytics', 'firebase.crashlytics()', firebase);
// bootstrap tests
suite.addTests(crashlyticsTests);