Skip to content

Commit a4f9873

Browse files
committed
PR feedback
1 parent a6456a0 commit a4f9873

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

packages/auth/src/platform_browser/auth.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,8 @@ describe('core/auth/initializeAuth', () => {
472472
_getInstance<PersistenceInternal>(inMemoryPersistence)
473473
);
474474
stub._get.returns(Promise.resolve(null));
475-
let user: UserInternal | null = null;
476475
completeRedirectFnStub.callsFake((auth: AuthInternal) => {
477-
user = testUser(auth, 'uid', '[email protected]');
476+
const user = testUser(auth, 'uid', '[email protected]');
478477
return Promise.resolve(
479478
new UserCredentialImpl({
480479
operationType: OperationType.SIGN_IN,
@@ -490,7 +489,7 @@ describe('core/auth/initializeAuth', () => {
490489
FAKE_APP.options.authDomain,
491490
/* blockMiddleware */ true
492491
);
493-
expect(user).not.to.be.null;
492+
expect(completeRedirectFnStub).to.have.been.called;
494493
expect(auth.currentUser).to.be.null;
495494
expect(reload._reloadWithoutSaving).not.to.have.been.called;
496495
});

packages/auth/test/integration/webdriver/persistence.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ browserDescribe('WebDriver persistence test', (driver, browser) => {
284284
.that.contains({ uid: user.uid });
285285
});
286286

287-
it('migrates user when switching from indexedDB to localStorage', async () => {
287+
it('migrates user when switching from indexedDB to localStorage', async function() {
288288
// This test only works in the modular SDK: the compat package does not
289289
// make the distinction between indexedDB and local storage (both are just
290290
// 'local').
291291
if (driver.isCompatLayer()) {
292292
console.warn('Skipping indexedDB to local migration in compat test');
293-
return;
293+
this.skip();
294294
}
295295

296296
await driver.call(AnonFunction.SIGN_IN_ANONYMOUSLY);
@@ -462,11 +462,11 @@ browserDescribe('WebDriver persistence test', (driver, browser) => {
462462
expect(await driver.getUserSnapshot()).to.contain({ uid: uid2 });
463463
});
464464

465-
it('middleware does not block tab sync', async () => {
465+
it('middleware does not block tab sync', async function() {
466466
if (driver.isCompatLayer()) {
467467
// Compat layer is skipped because it doesn't support middleware
468468
console.warn('Skipping middleware tabs in compat test');
469-
return;
469+
this.skip();
470470
}
471471

472472
// Blocking middleware in main page

packages/auth/test/integration/webdriver/popup.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ browserDescribe('Popup IdP tests', driver => {
6464
expect(result.user).to.eql(currentUser);
6565
});
6666

67-
it('is blocked by auth middleware', async () => {
67+
it('is blocked by auth middleware', async function () {
6868
if (driver.isCompatLayer()) {
6969
// Compat layer doesn't support middleware yet
70-
return;
70+
this.skip();
7171
}
7272

7373
await driver.call(MiddlewareFunction.ATTACH_BLOCKING_MIDDLEWARE);

packages/auth/test/integration/webdriver/redirect.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ browserDescribe('WebDriver redirect IdP test', driver => {
7474
});
7575

7676
// Redirect works with middleware for now
77-
it('is blocked by middleware', async () => {
77+
it('is blocked by middleware', async function () {
7878
if (driver.isCompatLayer()) {
7979
console.warn('Skipping middleware tests in compat');
80-
return;
80+
this.skip();
8181
}
8282

8383
await driver.callNoWait(RedirectFunction.IDP_REDIRECT);

0 commit comments

Comments
 (0)