From b58b24a8c804117fc9dd127bb9baab5945225c02 Mon Sep 17 00:00:00 2001 From: himanshu Date: Tue, 10 Dec 2024 11:38:04 +0530 Subject: [PATCH] fix import sfa test --- tests/sfaImport.spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/sfaImport.spec.ts b/tests/sfaImport.spec.ts index d1a0a7b..a229fcf 100644 --- a/tests/sfaImport.spec.ts +++ b/tests/sfaImport.spec.ts @@ -34,13 +34,10 @@ export const ImportSFATest = async (testVariable: ImportKeyTestVariable) => { } test(`import sfa key and recover tss key : ${testVariable.manualSync}`, async function (t) { - const beforeTest = async () => { - await resetAccount(testVariable.email); - }; - - await beforeTest(); - - await t.test("#recover Tss key using 2 factors key, import tss key to new oauth login", async function () { + const afterTest = async () => { + await resetAccount(testVariable.email); + }; + await t.test("#recover Tss key using 2 factors key, import tss key to new oauth login", async function () { const sfaResult = await loginWithSFA({ network: WEB3AUTH_NETWORK.DEVNET, manualSync: testVariable.manualSync, @@ -81,6 +78,7 @@ export const ImportSFATest = async (testVariable: ImportKeyTestVariable) => { }); + await afterTest(); t.afterEach(function () { return console.info("finished running recovery test"); });