mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[crashlytics] Move to top level crashlytics namespace
This commit is contained in:
@@ -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();
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user