mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
[tests][auth] ensure signed out state before each auth test
This commit is contained in:
@@ -2,7 +2,7 @@ describe('auth()', () => {
|
||||
beforeEach(async () => {
|
||||
if (firebase.auth().currentUser) {
|
||||
await firebase.auth().signOut();
|
||||
await sleep(25);
|
||||
await sleep(50);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
describe('auth() -> emailLink Provider', () => {
|
||||
beforeEach(async () => {
|
||||
if (firebase.auth().currentUser) {
|
||||
await firebase.auth().signOut();
|
||||
await sleep(50);
|
||||
}
|
||||
});
|
||||
|
||||
describe('sendSignInLinkToEmail', () => {
|
||||
it('should send email', async () => {
|
||||
const random = randomString(12, '#aA');
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
describe('auth() -> Providers', () => {
|
||||
beforeEach(async () => {
|
||||
if (firebase.auth().currentUser) {
|
||||
await firebase.auth().signOut();
|
||||
await sleep(50);
|
||||
}
|
||||
});
|
||||
|
||||
describe('EmailAuthProvider', () => {
|
||||
describe('constructor', () => {
|
||||
it('should throw an unsupported error', () => {
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
describe('auth().currentUser', () => {
|
||||
beforeEach(async () => {
|
||||
if (firebase.auth().currentUser) {
|
||||
await firebase.auth().signOut();
|
||||
await sleep(50);
|
||||
}
|
||||
});
|
||||
|
||||
describe('getIdToken()', () => {
|
||||
it('should return a token', async () => {
|
||||
const random = randomString(12, '#aA');
|
||||
|
||||
Reference in New Issue
Block a user