Skip to content

Commit 2857f04

Browse files
authored
Fix mfa totp unit test (#6858)
* Fix type error in totp unit test. * add ts-ignore for totp-generator.
1 parent 78b3d41 commit 2857f04

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe('core/mfa/assertions/totp/TotpMultiFactorGenerator', () => {
9393
);
9494
await TotpMultiFactorGenerator.generateSecret(session);
9595
} catch (e) {
96-
expect(e.code).to.eql(`auth/${AuthErrorCode.INTERNAL_ERROR}`);
96+
expect((e as any).code).to.eql(`auth/${AuthErrorCode.INTERNAL_ERROR}`);
9797
}
9898
});
9999
it('generateSecret should generate a valid secret by starting enrollment', async () => {

packages/auth/test/helpers/integration/helpers.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { getAuth, connectAuthEmulator } from '../../../'; // Use browser OR node
2323
import { _generateEventId } from '../../../src/core/util/event_id';
2424
import { getAppConfig, getEmulatorUrl } from './settings';
2525
import { resetEmulator } from './emulator_rest_helpers';
26+
// @ts-ignore - ignore types since this is only used in tests.
2627
import totp from 'totp-generator';
2728
interface IntegrationTestAuth extends Auth {
2829
cleanUp(): Promise<void>;

packages/auth/totp-generator.d.ts

-18
This file was deleted.

0 commit comments

Comments
 (0)