[tests] misc + auth tweaks
This commit is contained in:
parent
61f283c8d3
commit
25b23a1164
|
@ -15,7 +15,7 @@ class Root extends Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
message: '',
|
message: '',
|
||||||
};
|
};
|
||||||
|
firebase.firestore.enableLogging();
|
||||||
bridge.setBridgeProperty('module', firebase);
|
bridge.setBridgeProperty('module', firebase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
describe('auth()', () => {
|
describe('auth()', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
if (firebase.auth().currentUser) await firebase.auth().signOut();
|
if (firebase.auth().currentUser) {
|
||||||
|
await firebase.auth().signOut();
|
||||||
|
await sleep(25);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('applyActionCode()', () => {
|
describe('applyActionCode()', () => {
|
||||||
|
@ -83,6 +86,8 @@ describe('auth()', () => {
|
||||||
it('calls callback with the current user and when auth state changes', async () => {
|
it('calls callback with the current user and when auth state changes', async () => {
|
||||||
await firebase.auth().signInAnonymouslyAndRetrieveData();
|
await firebase.auth().signInAnonymouslyAndRetrieveData();
|
||||||
|
|
||||||
|
await sleep(50);
|
||||||
|
|
||||||
// Test
|
// Test
|
||||||
const callback = sinon.spy();
|
const callback = sinon.spy();
|
||||||
|
|
||||||
|
@ -101,9 +106,7 @@ describe('auth()', () => {
|
||||||
|
|
||||||
await firebase.auth().signOut();
|
await firebase.auth().signOut();
|
||||||
|
|
||||||
await new Promise(resolve => {
|
await sleep(50);
|
||||||
setTimeout(() => resolve(), 5);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assertions
|
// Assertions
|
||||||
|
|
||||||
|
@ -136,9 +139,7 @@ describe('auth()', () => {
|
||||||
|
|
||||||
await firebase.auth().signOut();
|
await firebase.auth().signOut();
|
||||||
|
|
||||||
await new Promise(resolve => {
|
await sleep(50);
|
||||||
setTimeout(() => resolve(), 5);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assertions
|
// Assertions
|
||||||
|
|
||||||
|
@ -184,10 +185,7 @@ describe('auth()', () => {
|
||||||
// Sign out
|
// Sign out
|
||||||
|
|
||||||
await firebase.auth().signOut();
|
await firebase.auth().signOut();
|
||||||
|
await sleep(50);
|
||||||
await new Promise(resolve => {
|
|
||||||
setTimeout(() => resolve(), 5);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assertions
|
// Assertions
|
||||||
|
|
||||||
|
@ -219,10 +217,7 @@ describe('auth()', () => {
|
||||||
// Sign out
|
// Sign out
|
||||||
|
|
||||||
await firebase.auth().signOut();
|
await firebase.auth().signOut();
|
||||||
|
await sleep(50);
|
||||||
await new Promise(resolve => {
|
|
||||||
setTimeout(() => resolve(), 5);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assertions
|
// Assertions
|
||||||
|
|
||||||
|
@ -269,9 +264,7 @@ describe('auth()', () => {
|
||||||
|
|
||||||
await firebase.auth().signOut();
|
await firebase.auth().signOut();
|
||||||
|
|
||||||
await new Promise(resolve => {
|
await sleep(50);
|
||||||
setTimeout(() => resolve(), 5);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assertions
|
// Assertions
|
||||||
|
|
||||||
|
@ -306,10 +299,7 @@ describe('auth()', () => {
|
||||||
// Sign out
|
// Sign out
|
||||||
|
|
||||||
await firebase.auth().signOut();
|
await firebase.auth().signOut();
|
||||||
|
await sleep(50);
|
||||||
await new Promise(resolve => {
|
|
||||||
setTimeout(() => resolve(), 5);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Assertions
|
// Assertions
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ PODS:
|
||||||
- React/Core
|
- React/Core
|
||||||
- React/fishhook
|
- React/fishhook
|
||||||
- React/RCTBlob
|
- React/RCTBlob
|
||||||
- RNFirebase (4.0.1):
|
- RNFirebase (4.0.2):
|
||||||
- React
|
- React
|
||||||
- yoga (0.52.3.React)
|
- yoga (0.52.3.React)
|
||||||
|
|
||||||
|
@ -235,11 +235,11 @@ DEPENDENCIES:
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
React:
|
React:
|
||||||
:path: "../node_modules/react-native"
|
:path: ../node_modules/react-native
|
||||||
RNFirebase:
|
RNFirebase:
|
||||||
:path: "../../ios/RNFirebase.podspec"
|
:path: ../../ios/RNFirebase.podspec
|
||||||
yoga:
|
yoga:
|
||||||
:path: "../node_modules/react-native/ReactCommon/yoga"
|
:path: ../node_modules/react-native/ReactCommon/yoga
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
BoringSSL: 32764dbaf5f5888cf51fbaa172a010126b41bcd4
|
BoringSSL: 32764dbaf5f5888cf51fbaa172a010126b41bcd4
|
||||||
|
@ -271,13 +271,13 @@ SPEC CHECKSUMS:
|
||||||
gRPC-RxLibrary: a41a4652d220f230ba1c0491a94ce2ee04c6180a
|
gRPC-RxLibrary: a41a4652d220f230ba1c0491a94ce2ee04c6180a
|
||||||
GTMOAuth2: c77fe325e4acd453837e72d91e3b5f13116857b2
|
GTMOAuth2: c77fe325e4acd453837e72d91e3b5f13116857b2
|
||||||
GTMSessionFetcher: 390ea358e5a0d0133153806f744662dad933d06b
|
GTMSessionFetcher: 390ea358e5a0d0133153806f744662dad933d06b
|
||||||
leveldb-library: '08cba283675b7ed2d99629a4bc5fd052cd2bb6a5'
|
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
|
||||||
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
|
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
|
||||||
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
|
Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03
|
||||||
React: c0dfd2dfc970019d1ae7d48bf24cef530992e079
|
React: c0dfd2dfc970019d1ae7d48bf24cef530992e079
|
||||||
RNFirebase: 973ad43718b555e793fdcbbac9c09756150f7024
|
RNFirebase: 26c3a2665b893f3ef61a3f0e5fc3f7662fb5d306
|
||||||
yoga: f45a46b966e1eb0c7a532cfd4beec5b97332ba48
|
yoga: f45a46b966e1eb0c7a532cfd4beec5b97332ba48
|
||||||
|
|
||||||
PODFILE CHECKSUM: ef0a6d57e421403d349fe645afe7593f62efb9e0
|
PODFILE CHECKSUM: ef0a6d57e421403d349fe645afe7593f62efb9e0
|
||||||
|
|
||||||
COCOAPODS: 1.2.1
|
COCOAPODS: 1.3.1
|
||||||
|
|
|
@ -1015,7 +1015,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
CC8D61273332DE7812CFF010 /* [CP] Copy Pods Resources */ = {
|
CC8D61273332DE7812CFF010 /* [CP] Copy Pods Resources */ = {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"test-android-cover": "nyc detox test --configuration android.emu.debug",
|
"test-android-cover": "nyc detox test --configuration android.emu.debug",
|
||||||
"test-android-cover-reuse": "nyc detox test --configuration android.emu.debug --reuse",
|
"test-android-cover-reuse": "nyc detox test --configuration android.emu.debug --reuse",
|
||||||
"test-ios": "detox test --configuration ios.sim.debug",
|
"test-ios": "detox test --configuration ios.sim.debug",
|
||||||
"test-ios-reuse": "detox test --configuration ios.sim.debug --reuse --loglevel warn",
|
"test-ios-reuse": "detox test --configuration ios.sim.debug --reuse --loglevel verbose",
|
||||||
"test-ios-cover": "nyc detox test --configuration ios.sim.debug",
|
"test-ios-cover": "nyc detox test --configuration ios.sim.debug",
|
||||||
"test-ios-cover-reuse": "nyc detox test --configuration ios.sim.debug --reuse --loglevel warn",
|
"test-ios-cover-reuse": "nyc detox test --configuration ios.sim.debug --reuse --loglevel warn",
|
||||||
"ios:pod:install": "cd ios && rm -rf ReactNativeFirebaseDemo.xcworkspace && pod install && cd .."
|
"ios:pod:install": "cd ios && rm -rf ReactNativeFirebaseDemo.xcworkspace && pod install && cd .."
|
||||||
|
|
Loading…
Reference in New Issue