Skip to content

Fix mfa totp unit test #6858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/auth/src/mfa/assertions/totp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('core/mfa/assertions/totp/TotpMultiFactorGenerator', () => {
);
await TotpMultiFactorGenerator.generateSecret(session);
} catch (e) {
expect(e.code).to.eql(`auth/${AuthErrorCode.INTERNAL_ERROR}`);
expect((e as any).code).to.eql(`auth/${AuthErrorCode.INTERNAL_ERROR}`);
}
});
it('generateSecret should generate a valid secret by starting enrollment', async () => {
Expand Down
1 change: 1 addition & 0 deletions packages/auth/test/helpers/integration/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { getAuth, connectAuthEmulator } from '../../../'; // Use browser OR node
import { _generateEventId } from '../../../src/core/util/event_id';
import { getAppConfig, getEmulatorUrl } from './settings';
import { resetEmulator } from './emulator_rest_helpers';
// @ts-ignore - ignore types since this is only used in tests.
import totp from 'totp-generator';
interface IntegrationTestAuth extends Auth {
cleanUp(): Promise<void>;
Expand Down
18 changes: 0 additions & 18 deletions packages/auth/totp-generator.d.ts

This file was deleted.