From 3d885596828fb9d375bccd7e48eee9610629971d Mon Sep 17 00:00:00 2001 From: guru-web3 <105355858+guru-web3@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:12:28 +0530 Subject: [PATCH] fix: review comments --- packages/default/test/shared.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/default/test/shared.js b/packages/default/test/shared.js index 81b21c70..a76f3084 100644 --- a/packages/default/test/shared.js +++ b/packages/default/test/shared.js @@ -768,7 +768,7 @@ export const sharedTestCases = (mode, torusSP, storageLayer) => { }); it(`#should be not be able to lookup delete share, manualSync=${mode}`, async function () { - if (!customSP.useTSS) this(); + if (!customSP.useTSS) this.skip(); const newKeys = Object.keys(shareStoreAfterDelete); if (newKeys.find((el) => el === deletedShareIndex.toString("hex"))) { fail("Unable to delete share index"); @@ -808,7 +808,7 @@ export const sharedTestCases = (mode, torusSP, storageLayer) => { // // TODO: check that TSS nonce is reset // }); it(`#should be able to reinitialize after wipe, manualSync=${mode}`, async function () { - if (!customSP.useTSS) this(); + if (!customSP.useTSS) this.skip(); // create 2/4 const resp1 = await tb._initializeNewKey({ initializeModules: true }); await tb.generateNewShare(); @@ -842,7 +842,7 @@ export const sharedTestCases = (mode, torusSP, storageLayer) => { tb = new ThresholdKey({ serviceProvider: customSP, storageLayer: customSL, manualSync: mode }); }); it(`#should serialize and deserialize correctly without tkeyArgs, manualSync=${mode}`, async function () { - if (!customSP.useTSS) this(); + if (!customSP.useTSS) this.skip(); const sp = customSP; let userInput = new BN(keccak256(Buffer.from("user answer blublu", "utf-8")).slice(2), "hex"); userInput = userInput.umod(ecCurve.curve.n); @@ -900,7 +900,7 @@ export const sharedTestCases = (mode, torusSP, storageLayer) => { strictEqual(tssPrivKey.toString("hex"), tssPrivKey2.toString("hex"), "Incorrect tss key"); }); it(`#should serialize and deserialize correctly with tkeyArgs, manualSync=${mode}`, async function () { - if (!customSP.useTSS) this(); + if (!customSP.useTSS) this.skip(); let userInput = new BN(keccak256(Buffer.from("user answer blublu", "utf-8")).slice(2), "hex"); userInput = userInput.umod(ecCurve.curve.n); const resp1 = await tb._initializeNewKey({ userInput, initializeModules: true }); @@ -959,7 +959,7 @@ export const sharedTestCases = (mode, torusSP, storageLayer) => { }); // TODO: add test for initialize such that initialize throws if the remote metadata is already there it(`#should serialize and deserialize correctly, keeping localTransitions consistent before syncing NewKeyAssign, manualSync=${mode}`, async function () { - if (!customSP.useTSS) this(); + if (!customSP.useTSS) this.skip(); const sp = customSP; sp.verifierName = "torus-test-health"; @@ -1005,7 +1005,7 @@ export const sharedTestCases = (mode, torusSP, storageLayer) => { } }); it(`#should serialize and deserialize correctly keeping localTransitions afterNewKeyAssign, manualSync=${mode}`, async function () { - if (!customSP.useTSS) this(); + if (!customSP.useTSS) this.skip(); let userInput = new BN(keccak256(Buffer.from("user answer blublu", "utf-8")).slice(2), "hex"); userInput = userInput.umod(ecCurve.curve.n); const resp1 = await tb._initializeNewKey({ userInput, initializeModules: true });