diff --git a/Test.js b/Test.js index f96160f..80c1b1f 100644 --- a/Test.js +++ b/Test.js @@ -13,15 +13,15 @@ const REGEX_PATTERN_HIDDEN_FILES = /(^|\/)\.[^\/\.]/g; var test_all = async function () { try { var problems = []; - for(const i in TESTS_FOLDERS) { - var folder = TESTS_FOLDERS[i]; + for (const i in TESTS_FOLDERS) { + var folder = TESTS_FOLDERS[ i ]; var new_problems = await loadProblemsFiles(folder); // await problems = problems.concat(new_problems); }; console.log(problems); var solvePromises = problems.map(solve); - + await Promise.all(solvePromises) } catch (error) { console.log(error); @@ -33,14 +33,14 @@ var solve = (problem) => { try { console.log("Solving: " + problem); - const tests = require(problem); + const tests = require(problem); console.log("*" * 100); if (Object.keys(tests).length == 0) { console.warn("🔴 The problem " + problem + " doesn't have a test method implemented.\n"); return; } - for(testIdx in tests) { - tests[testIdx](); + for (testIdx in tests) { + tests[ testIdx ](); } console.log("✅ Tests for " + problem + " run successfully \n"); } catch (error) {