Skip to content

Commit 0b7b931

Browse files
committed
fix: tests
make corekit new instance for each tests fix getSessionSignatures
1 parent 3dd275a commit 0b7b931

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

tests/sessionTime.spec.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,20 @@ variable.forEach(async (testVariable) => {
6363

6464

6565
await test(`#Variable SessionTime test : ${JSON.stringify({ sessionTime: testVariable.sessionTime })} - disableSessionManager: ${disableSessionManager} client_id: ${web3AuthClientId}`, async (t) => {
66-
const coreKitInstance = new Web3AuthMPCCoreKit({
67-
web3AuthClientId,
68-
web3AuthNetwork,
69-
baseUrl: "http://localhost:3000",
70-
uxMode,
71-
tssLib,
72-
storage: storageInstance,
73-
manualSync,
74-
sessionTime,
75-
disableSessionManager,
76-
});
66+
let coreKitInstance: Web3AuthMPCCoreKit;
7767

7868
async function beforeTest() {
69+
coreKitInstance= new Web3AuthMPCCoreKit({
70+
web3AuthClientId,
71+
web3AuthNetwork,
72+
baseUrl: "http://localhost:3000",
73+
uxMode,
74+
tssLib,
75+
storage: storageInstance,
76+
manualSync,
77+
sessionTime,
78+
disableSessionManager,
79+
});
7980
if (coreKitInstance.status === COREKIT_STATUS.INITIALIZED) await criticalResetAccount(coreKitInstance);
8081
}
8182

@@ -110,7 +111,8 @@ variable.forEach(async (testVariable) => {
110111
return;
111112
}
112113

113-
coreKitInstance.signatures.forEach((sig) => {
114+
const sigs = await coreKitInstance.getSessionSignatures();
115+
sigs.forEach((sig) => {
114116
const parsedSig = JSON.parse(sig);
115117
const parsedSigData = JSON.parse(atob(parsedSig.data));
116118

0 commit comments

Comments
 (0)