From 879c95cde7402da87f727f20c1de58f5138a8eeb Mon Sep 17 00:00:00 2001 From: pradyuman-verma Date: Mon, 6 Dec 2021 18:17:22 +0530 Subject: [PATCH] updated scripts --- scripts/tests/run-tests.ts | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/scripts/tests/run-tests.ts b/scripts/tests/run-tests.ts index de48de95..de397629 100644 --- a/scripts/tests/run-tests.ts +++ b/scripts/tests/run-tests.ts @@ -33,19 +33,29 @@ async function testRunner() { start = Date.now(); let path: string; if (testName === "all") { - path = availableTests.map((file) => join(testsPath, file)).join(" "); + for (let test of availableTests) { + path = join(testsPath, test); + path += "/*"; + await execScript({ + cmd: "npx", + args: ["hardhat", "test", path], + env: { + networkType: chain, + }, + }); + } } else { path = join(testsPath, testName); - } - path += "/*"; + path += "/*"; - await execScript({ - cmd: "npx", - args: ["hardhat", "test", path], - env: { - networkType: chain, - }, - }); + await execScript({ + cmd: "npx", + args: ["hardhat", "test", path], + env: { + networkType: chain, + }, + }); + } end = Date.now(); }