Skip to content

Commit f497326

Browse files
committed
reverting unwanted changes in helper.ts
1 parent 510d008 commit f497326

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

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

+3-18
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ import { Auth, User } from '../../../src/model/public_types';
2222
import { getAuth, connectAuthEmulator } from '../../../'; // Use browser OR node dist entrypoint depending on test env.
2323
import { _generateEventId } from '../../../src/core/util/event_id';
2424
import { getAppConfig, getEmulatorUrl } from './settings';
25-
import {
26-
getOobCodes,
27-
OobCodeSession,
28-
resetEmulator
29-
} from './emulator_rest_helpers';
25+
import { resetEmulator } from './emulator_rest_helpers';
3026
import totp from 'totp-generator';
3127
interface IntegrationTestAuth extends Auth {
3228
cleanUp(): Promise<void>;
@@ -82,15 +78,9 @@ export function getTestInstance(requireEmulator = false): Auth {
8278
return auth;
8379
}
8480

85-
export async function cleanUpTestInstance(
86-
auth: Auth,
87-
tests?: string
88-
): Promise<void> {
81+
export async function cleanUpTestInstance(auth: Auth): Promise<void> {
8982
await auth.signOut();
90-
91-
if (typeof tests === 'undefined') {
92-
await (auth as IntegrationTestAuth).cleanUp();
93-
}
83+
await (auth as IntegrationTestAuth).cleanUp();
9484
}
9585

9686
function stubConsoleToSilenceEmulatorWarnings(): sinon.SinonStub {
@@ -106,11 +96,6 @@ function stubConsoleToSilenceEmulatorWarnings(): sinon.SinonStub {
10696
});
10797
}
10898

109-
export async function code(toEmail: string): Promise<OobCodeSession> {
110-
const codes = await getOobCodes();
111-
return codes.reverse().find(({ email }) => email === toEmail)!;
112-
}
113-
11499
export function getTotpCode(
115100
sharedSecretKey: string,
116101
periodSec: number,

packages/auth/test/integration/flows/totp.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe(' Integration tests: Mfa TOTP', () => {
5252
});
5353

5454
afterEach(async () => {
55-
await cleanUpTestInstance(auth, 'totp');
55+
await cleanUpTestInstance(auth);
5656
});
5757

5858
it('should not enroll if incorrect totp supplied', async () => {

0 commit comments

Comments
 (0)