Skip to content

Commit

Permalink
Rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
avolkovi committed May 19, 2020
1 parent 8333925 commit beda9fc
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15,549 deletions.
1 change: 1 addition & 0 deletions packages-exp/auth-exp/package.json
Expand Up @@ -37,6 +37,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@rollup/plugin-strip": "^1.3.2",
"@firebase/app-exp": "0.x",
"rollup": "1.32.1",
"rollup-plugin-json": "4.0.0",
"rollup-plugin-replace": "2.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages-exp/auth-exp/src/api/index.ts
Expand Up @@ -27,7 +27,6 @@ import {
ServerError,
ServerErrorMap
} from './errors';
import { Delay } from '../core/util/delay';

export enum HttpMethod {
POST = 'POST',
Expand Down
2 changes: 0 additions & 2 deletions packages-exp/auth-exp/src/core/auth/auth_impl.test.ts
Expand Up @@ -15,8 +15,6 @@
* limitations under the License.
*/

import { FirebaseApp } from '@firebase/app-types-exp';
import { FirebaseError } from '@firebase/util';
import { expect, use } from 'chai';
import * as sinon from 'sinon';
import * as sinonChai from 'sinon-chai';
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/auth-exp/src/core/auth/auth_impl.ts
Expand Up @@ -38,7 +38,7 @@ export const DEFAULT_TOKEN_API_HOST = 'securetoken.googleapis.com';
export const DEFAULT_API_HOST = 'identitytoolkit.googleapis.com';
export const DEFAULT_API_SCHEME = 'https';

export class AuthImpl implements Auth {
class AuthImpl implements Auth {
currentUser: User | null = null;
private operations = Promise.resolve();
private persistenceManager?: PersistenceUserManager;
Expand Down
6 changes: 3 additions & 3 deletions packages-exp/auth-exp/src/core/user/reload.test.ts
Expand Up @@ -25,7 +25,7 @@ import { FirebaseError } from '@firebase/util';

import { mockEndpoint } from '../../../test/api/helper';
import { testUser } from '../../../test/mock_auth';
import * as mockFetch from '../../../test/mock_fetch';
import * as fetch from '../../../test/mock_fetch';
import { Endpoint } from '../../api';
import {
APIUserInfo,
Expand Down Expand Up @@ -56,8 +56,8 @@ const BASIC_PROVIDER_USER_INFO: ProviderUserInfo = {
};

describe('core/user/reload', () => {
beforeEach(mockFetch.setUp);
afterEach(mockFetch.tearDown);
beforeEach(fetch.setUp);
afterEach(fetch.tearDown);

it('sets all the new properties', async () => {
const serverUser: APIUserInfo = {
Expand Down
9 changes: 4 additions & 5 deletions packages-exp/auth-exp/src/core/user/user_impl.test.ts
Expand Up @@ -15,13 +15,11 @@
* limitations under the License.
*/

import { FirebaseError } from '@firebase/util';
import { expect, use } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import * as sinon from 'sinon';
import * as sinonChai from 'sinon-chai';

import { FirebaseError } from '@firebase/util';

import { mockEndpoint } from '../../../test/api/helper';
import { makeJWT } from '../../../test/jwt';
import { mockAuth } from '../../../test/mock_auth';
Expand All @@ -30,6 +28,7 @@ import { Endpoint } from '../../api';
import { IdTokenResponse } from '../../model/id_token';
import { StsTokenManager } from './token_manager';
import { UserImpl } from './user_impl';
import { APIUserInfo } from '../../api/account_management/account';

use(sinonChai);
use(chaiAsPromised);
Expand Down Expand Up @@ -209,12 +208,12 @@ describe('core/user/user_impl', () => {
};

beforeEach(() => {
mockFetch.setUp();
fetch.setUp();
mockEndpoint(Endpoint.GET_ACCOUNT_INFO, {
users: [serverUser]
});
});
afterEach(mockFetch.tearDown);
afterEach(fetch.tearDown);

it('should initialize a user', async () => {
const user = await UserImpl._fromIdTokenResponse(
Expand Down
4 changes: 2 additions & 2 deletions packages-exp/auth-exp/src/core/user/user_impl.ts
Expand Up @@ -16,15 +16,15 @@
*/

import { IdTokenResult } from '@firebase/auth-types-exp';

import { deleteAccount } from '../../api/account_management/account';
import { Auth } from '../../model/auth';
import { IdTokenResponse } from '../../model/id_token';
import { User } from '../../model/user';
import { PersistedBlob } from '../persistence';
import { ProviderId } from '../providers';
import { assert } from '../util/assert';
import { getIdTokenResult } from './id_token_result';
import { reload } from './reload';
import { reload, _reloadWithoutSaving } from './reload';
import { StsTokenManager } from './token_manager';

export interface UserParameters {
Expand Down
4 changes: 3 additions & 1 deletion packages-exp/auth-exp/test/mock_auth.ts
Expand Up @@ -15,14 +15,15 @@
* limitations under the License.
*/

import { StsTokenManager } from '../src/core/user/token_manager';
import { AuthImpl } from '../src/core/auth/auth_impl';
import { StsTokenManager } from '../src/core/user/token_manager';
import { UserImpl } from '../src/core/user/user_impl';
import { Auth } from '../src/model/auth';
import { User } from '../src/model/user';

export const TEST_HOST = 'localhost';
export const TEST_TOKEN_HOST = 'localhost/token';
export const TEST_AUTH_DOMAIN = 'localhost';
export const TEST_SCHEME = 'mock';
export const TEST_KEY = 'test-api-key';

Expand All @@ -33,6 +34,7 @@ export const mockAuth: Auth = new AuthImpl(
authDomain: TEST_AUTH_DOMAIN,
apiHost: TEST_HOST,
apiScheme: TEST_SCHEME,
tokenApiHost: TEST_TOKEN_HOST,
sdkClientVersion: 'testSDK/0.0.0'
},
[]
Expand Down

0 comments on commit beda9fc

Please sign in to comment.