Skip to content

Commit 88a3aa9

Browse files
committed
test(auth): getRandomPhoneNumber is not async, do not await
1 parent 8956d58 commit 88a3aa9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/auth/e2e/phone.e2e.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('auth() => Phone', function () {
2323

2424
describe('signInWithPhoneNumber', function () {
2525
it('signs in with a valid code', async function () {
26-
const testPhone = await getRandomPhoneNumber();
26+
const testPhone = getRandomPhoneNumber();
2727
const confirmResult = await firebase.auth().signInWithPhoneNumber(testPhone);
2828
confirmResult.verificationId.should.be.a.String();
2929
should.ok(confirmResult.verificationId.length, 'verificationId string should not be empty');
@@ -37,7 +37,7 @@ describe('auth() => Phone', function () {
3737
});
3838

3939
it('errors on invalid code', async function () {
40-
const testPhone = await getRandomPhoneNumber();
40+
const testPhone = getRandomPhoneNumber();
4141
const confirmResult = await firebase.auth().signInWithPhoneNumber(testPhone);
4242
confirmResult.verificationId.should.be.a.String();
4343
should.ok(confirmResult.verificationId.length, 'verificationId string should not be empty');
@@ -56,23 +56,23 @@ describe('auth() => Phone', function () {
5656

5757
describe('verifyPhoneNumber', function () {
5858
it('successfully verifies', async function () {
59-
const testPhone = await getRandomPhoneNumber();
59+
const testPhone = getRandomPhoneNumber();
6060
const confirmResult = await firebase.auth().signInWithPhoneNumber(testPhone);
6161
const lastSmsCode = await getLastSmsCode(testPhone);
6262
await confirmResult.confirm(lastSmsCode);
6363
await firebase.auth().verifyPhoneNumber(testPhone, false, false);
6464
});
6565

6666
it('uses the autoVerifyTimeout when a non boolean autoVerifyTimeoutOrForceResend is provided', async function () {
67-
const testPhone = await getRandomPhoneNumber();
67+
const testPhone = getRandomPhoneNumber();
6868
const confirmResult = await firebase.auth().signInWithPhoneNumber(testPhone);
6969
const lastSmsCode = await getLastSmsCode(testPhone);
7070
await confirmResult.confirm(lastSmsCode);
7171
await firebase.auth().verifyPhoneNumber(testPhone, 0, false);
7272
});
7373

7474
it('throws an error with an invalid on event', async function () {
75-
const testPhone = await getRandomPhoneNumber();
75+
const testPhone = getRandomPhoneNumber();
7676
try {
7777
await firebase
7878
.auth()
@@ -89,7 +89,7 @@ describe('auth() => Phone', function () {
8989
});
9090

9191
it('throws an error with an invalid observer event', async function () {
92-
const testPhone = await getRandomPhoneNumber();
92+
const testPhone = getRandomPhoneNumber();
9393
try {
9494
await firebase
9595
.auth()
@@ -106,7 +106,7 @@ describe('auth() => Phone', function () {
106106
});
107107

108108
it('successfully runs verification complete handler', async function () {
109-
const testPhone = await getRandomPhoneNumber();
109+
const testPhone = getRandomPhoneNumber();
110110
await firebase
111111
.auth()
112112
.verifyPhoneNumber(testPhone)

0 commit comments

Comments
 (0)