Files
react-native-firebase/packages/crashlytics/type-test.ts
Aure77 cad58e178b feat(crashlytics)!: upgrade to new Firebase Crashlytics SDK (#3580)
Goodbye Fabric, hello Firebase Crashlytics.

BREAKING CHANGE: This is a breaking change to remove the use of the Fabric SDKs.

Co-authored-by: David Buchan-Swanson <david.buchanswanson@gmail.com>
Co-authored-by: Mike Diarmid <mike.diarmid@gmail.com>
[publish]
2020-06-30 20:56:01 +01:00

38 lines
1.1 KiB
TypeScript

import firebase from '@react-native-firebase/app';
import * as crashlytics from '@react-native-firebase/crashlytics';
crashlytics.default().crash();
// checks module exists at root
console.log(firebase.crashlytics().app.name);
console.log(firebase.crashlytics().isCrashlyticsCollectionEnabled);
// checks module exists at app level
console.log(firebase.app().crashlytics().app.name);
console.log(firebase.app().crashlytics().isCrashlyticsCollectionEnabled);
// checks statics exist
console.log(firebase.crashlytics.SDK_VERSION);
// checks statics exist on defaultExport
console.log(crashlytics.firebase.SDK_VERSION);
// checks root exists
console.log(firebase.SDK_VERSION);
// checks firebase named export exists on module
console.log(crashlytics.firebase.SDK_VERSION);
// checks multi-app support exists
// console.log(firebase.crashlytics(firebase.app()).app.name);
// checks default export supports app arg
// console.log(defaultExport(firebase.app()).app.name);
console.log(firebase.crashlytics().isCrashlyticsCollectionEnabled);
console.log(firebase.crashlytics().log('foo'));
firebase
.crashlytics()
.setUserId('id')
.then();