From b98a8cee2d9e4398f142ff40b89ffae0ea269381 Mon Sep 17 00:00:00 2001 From: fauna-chase Date: Tue, 25 Jul 2023 19:09:46 -0500 Subject: [PATCH] fix test file indentation --- src/test/suite/index.ts | 45 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts index b3e944d..c904e98 100644 --- a/src/test/suite/index.ts +++ b/src/test/suite/index.ts @@ -12,28 +12,27 @@ export async function run(): Promise { const testsRoot = path.resolve(__dirname, ".."); - return new Promise((resolve, reject) => { - let filesP = glob("**/**.test.js", { cwd: testsRoot }); - filesP.then(files => { - console.error(files); - files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f))); + return new Promise((resolve, reject) => { + let filesP = glob("**/**.test.js", { cwd: testsRoot }); + filesP.then(files => { + console.error(files); + files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f))); - try { - mocha.run((failures) => { - process.exitCode = failures ? 1 : 0; - if (failures > 0) { - reject(new Error(`${failures} tests failed`)); - } else { - resolve(); - } - }); - } catch (err) { - console.error(err); - process.exitCode = 1; - } - }).catch(error => { - console.error("failed to run tests"); - console.error(error); - }); - }); + try { + mocha.run((failures) => { + process.exitCode = failures ? 1 : 0; + if (failures > 0) { + reject(new Error(`${failures} tests failed`)); + } else { + resolve(); + } + }); + } catch (err) { + console.error(err); + process.exitCode = 1; + } + }).catch(error => { + console.error(`failed to run tests ${error}`); + }); + }); }