[tests][auth] set firebase.auth.AuthSettings settings before running Phone Auth tests

This commit is contained in:
Salakar
2018-09-16 21:39:51 +01:00
parent 20d209ebcf
commit 6b0146e3dd

View File

@@ -5,16 +5,20 @@ const TEST_PHONE_B = '+447445123457';
const TEST_CODE_B = '654321';
describe('auth() => Phone', () => {
// TODO implement settings api
// before(async () => {
// await firebase.auth().settings({
// appVerificationDisabledForTesting: true,
// autoRetrievedSmsCodesForPhoneNumbers: [
// { phoneNumber: TEST_PHONE_A, smsCode: TEST_CODE_A },
// { phoneNumber: TEST_PHONE_B, smsCode: TEST_CODE_B },
// ],
// });
// });
before(async () => {
// iOS
firebase.auth().settings.appVerificationDisabledForTesting = true;
// android
await firebase
.auth()
.settings.setAutoRetrievedSmsCodeForPhoneNumber(
TEST_PHONE_A,
TEST_CODE_A
);
await sleep(50);
});
beforeEach(async () => {
if (firebase.auth().currentUser) {