Skip to content

Commit 42b7565

Browse files
committed
reverting linter changes in .test files
1 parent aee6866 commit 42b7565

File tree

8 files changed

+16
-5045
lines changed

8 files changed

+16
-5045
lines changed

packages/auth/demo/yarn.lock

-5,025
This file was deleted.

packages/auth/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ function getTestFiles(argv) {
5454
}
5555

5656
function getTestBrowsers(argv) {
57-
let browsers = ['ChromeHeadless'];
57+
let browsers = ["ChromeHeadless"];
5858
if (process.env?.BROWSERS && argv.unit) {
5959
browsers = process.env?.BROWSERS?.split(',');
60-
}
60+
}
6161
return browsers;
6262
}
6363

packages/auth/src/core/util/version.test.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ describe('core/util/_getClientVersion', () => {
4242
context('worker', () => {
4343
it('should set the correct version', () => {
4444
expect(_getClientVersion(ClientPlatform.WORKER)).to.eq(
45-
`${_getBrowserName(
46-
getUA()
47-
)}-Worker/JsCore/${SDK_VERSION}/FirebaseCore-web`
45+
`${_getBrowserName(getUA())}-Worker/JsCore/${SDK_VERSION}/FirebaseCore-web`
4846
);
4947
});
5048
});

packages/auth/src/mfa/assertions/totp.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
* limitations under the License.
1616
*/
1717
import { TotpSecret } from '../../platform_browser/mfa/assertions/totp';
18-
import { TotpMultiFactorAssertion } from '../../model/public_types';
18+
import { TotpMultiFactorAssertion, MultiFactorSession } from '../../model/public_types';
1919
import { FactorId } from '../../model/enum_maps';
20-
import { MultiFactorSession } from '../../model/public_types';
2120
/**
2221
* Provider for generating a {@link TotpMultiFactorAssertion}.
2322
*
@@ -34,8 +33,8 @@ export class TotpMultiFactorGenerator {
3433
* {@link MultiFactorUser.enroll}.
3534
*/
3635
static assertionForEnrollment(
37-
secret: TotpSecret,
38-
oneTimePassword: string
36+
_secret: TotpSecret,
37+
_oneTimePassword: string
3938
): TotpMultiFactorAssertion {
4039
throw new Error('Unimplemented');
4140
}
@@ -49,8 +48,8 @@ export class TotpMultiFactorGenerator {
4948
* {@link MultiFactorResolver.resolveSignIn}.
5049
*/
5150
static assertionForSignIn(
52-
enrollmentId: string,
53-
otp: string
51+
_enrollmentId: string,
52+
_otp: string
5453
): TotpMultiFactorAssertion {
5554
throw new Error('Unimplemented');
5655
}
@@ -64,7 +63,7 @@ export class TotpMultiFactorGenerator {
6463
* @returns A promise to {@link TotpSecret}.
6564
*/
6665
static async generateSecret(
67-
session: MultiFactorSession
66+
_session: MultiFactorSession
6867
): Promise<TotpSecret> {
6968
throw new Error('Unimplemented');
7069
}

packages/auth/src/model/public_types.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,8 @@ export interface AuthProvider {
543543
*/
544544
export const enum FactorId {
545545
/** Phone as second factor */
546-
PHONE = 'phone'
546+
PHONE = 'phone',
547+
TOTP = 'totp'
547548
}
548549

549550
/**

packages/auth/src/platform_browser/mfa/assertions/totp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class TotpSecret {
7474
* @returns A QRCode URL string.
7575
*/
7676

77-
generateQrCodeUrl(accountName?: string, issuer?: string): string {
77+
generateQrCodeUrl(_accountName?: string, issuer?: string): string {
7878
return null as any;
7979
}
8080
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ describe('platform_browser/persistence/session_storage', () => {
6666
afterEach(() => sinon.restore());
6767

6868
it('should emit false if sessionStorage setItem throws', async () => {
69-
sinon.stub(Storage.prototype, 'setItem').throws(new Error('nope'));
70-
expect(await persistence._isAvailable()).to.be.false;
69+
sinon.stub(Storage.prototype, 'setItem').throws(new Error('nope'));
70+
expect(await persistence._isAvailable()).to.be.false;
7171
});
7272

7373
it('should emit false if sessionStorage removeItem throws', async () => {

packages/auth/src/platform_cordova/popup_redirect/events.test.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ describe('platform_cordova/popup_redirect/events', () => {
7373
const spy = sinon.spy(Storage.prototype, 'setItem');
7474
const event = _generateNewEvent(auth, AuthEventType.REAUTH_VIA_REDIRECT);
7575
await _savePartialEvent(auth, event);
76-
expect(spy).to.have.been.calledWith(
77-
'firebase:authEvent:test-api-key:test-app',
78-
JSON.stringify(event)
79-
);
76+
expect(spy).to.have.been.calledWith('firebase:authEvent:test-api-key:test-app',
77+
JSON.stringify(event));
8078
});
8179
});
8280

0 commit comments

Comments
 (0)