Skip to content

Commit 79cf7fe

Browse files
committed
update auth-compat
1 parent e6b93b3 commit 79cf7fe

File tree

12 files changed

+150
-163
lines changed

12 files changed

+150
-163
lines changed

packages-exp/auth-compat-exp/index.node.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@
2121
* implementation that mandates having a separate entrypoint. Otherwise you can
2222
* just use index.ts
2323
*/
24-
2524
export * from './index';

packages-exp/auth-compat-exp/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import firebase, { _FirebaseNamespace } from '@firebase/app-compat';
1919
import * as impl from '@firebase/auth-exp/internal';
20-
import * as externs from '@firebase/auth-types-exp';
20+
import * as externs from '@firebase/auth-exp';
2121
import {
2222
Component,
2323
ComponentType,

packages-exp/auth-compat-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"test:all": "run-p test:browser test:node",
2121
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
2222
"test:browser": "karma start --single-run",
23-
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --config ../../config/mocharc.node.js"
23+
"test:node": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha src/**/*.test.* --file ../auth-exp/src/platform_browser/iframe/gapi.iframes.ts --config ../../config/mocharc.node.js"
2424
},
2525
"peerDependencies": {
2626
"@firebase/app-compat": "0.x"

packages-exp/auth-compat-exp/src/auth.test.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
*/
1717

1818
import { FirebaseApp } from '@firebase/app-compat';
19-
import * as impl from '@firebase/auth-exp/internal';
20-
import { Config } from '@firebase/auth-exp';
19+
import * as exp from '@firebase/auth-exp/internal';
2120
import { expect, use } from 'chai';
2221
import * as sinon from 'sinon';
2322
import * as sinonChai from 'sinon-chai';
@@ -29,13 +28,13 @@ use(sinonChai);
2928
// of the auth compat layer are more complicated: these tests cover those
3029
describe('auth compat', () => {
3130
context('redirect persistence key storage', () => {
32-
let underlyingAuth: impl.AuthImpl;
31+
let underlyingAuth: exp.AuthImpl;
3332
let app: FirebaseApp;
3433
beforeEach(() => {
3534
app = { options: { apiKey: 'api-key' } } as FirebaseApp;
36-
underlyingAuth = new impl.AuthImpl(app, {
35+
underlyingAuth = new exp.AuthImpl(app, {
3736
apiKey: 'api-key'
38-
} as Config);
37+
} as exp.Config);
3938
sinon.stub(underlyingAuth, '_initializeWithPersistence');
4039
});
4140

@@ -48,7 +47,7 @@ describe('auth compat', () => {
4847
if (typeof self !== 'undefined') {
4948
sinon.stub(underlyingAuth, '_getPersistence').returns('TEST');
5049
// eslint-disable-next-line @typescript-eslint/no-floating-promises
51-
authCompat.signInWithRedirect(new impl.GoogleAuthProvider());
50+
authCompat.signInWithRedirect(new exp.GoogleAuthProvider());
5251
expect(
5352
sessionStorage.getItem('firebase:persistence:api-key:undefined')
5453
).to.eq('TEST');
@@ -67,10 +66,10 @@ describe('auth compat', () => {
6766
underlyingAuth._initializeWithPersistence
6867
).to.have.been.calledWith(
6968
[
70-
impl._getInstance(impl.inMemoryPersistence),
71-
impl._getInstance(impl.indexedDBLocalPersistence)
69+
exp._getInstance(exp.inMemoryPersistence),
70+
exp._getInstance(exp.indexedDBLocalPersistence)
7271
],
73-
impl.browserPopupRedirectResolver
72+
exp.browserPopupRedirectResolver
7473
);
7574
}
7675
});

0 commit comments

Comments
 (0)