Skip to content

Commit 8b28231

Browse files
committed
Fix broken test on CI
1 parent 05a06ed commit 8b28231

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

packages-exp/auth-exp/src/core/strategies/email.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ import { Operation, ProviderId } from '@firebase/auth-types-exp';
2424
import { FirebaseError, isNode } from '@firebase/util';
2525

2626
import { mockEndpoint } from '../../../test/helpers/api/helper';
27-
import { testAuth, testUser, TestAuth } from '../../../test/helpers/mock_auth';
27+
import { testAuth, TestAuth, testUser } from '../../../test/helpers/mock_auth';
2828
import * as mockFetch from '../../../test/helpers/mock_fetch';
2929
import { Endpoint } from '../../api';
3030
import { ServerError } from '../../api/errors';
3131
import { User } from '../../model/user';
3232
import {
33-
fetchSignInMethodsForEmail,
34-
sendEmailVerification,
35-
verifyBeforeUpdateEmail
33+
fetchSignInMethodsForEmail, sendEmailVerification, verifyBeforeUpdateEmail
3634
} from './email';
3735

3836
use(chaiAsPromised);
@@ -72,10 +70,10 @@ describe('core/strategies/fetchSignInMethodsForEmail', () => {
7270
});
7371
const response = await fetchSignInMethodsForEmail(auth, email);
7472
expect(response).to.eql(expectedSignInMethods);
75-
expect(mock.calls[0].request).to.eql({
76-
identifier: email,
77-
continueUri: 'http://localhost:8089/context.html'
78-
});
73+
const request = mock.calls[0].request as Record<string, string>;
74+
expect(request['identifier']).to.eq(email);
75+
// We can't rely on a fixed port number
76+
expect(request['continueUri']).to.match(/http:\/\/localhost:[0-9]+\/context\.html/);
7977
});
8078
}
8179

0 commit comments

Comments
 (0)