From 705723f9193c2bbf696aabaabdde69c49c304019 Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Sun, 19 Jul 2020 10:42:15 -0700 Subject: [PATCH] serial iteration instead of parallel hopefully it's not too slow --- test/scripts/test_examples.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/scripts/test_examples.js b/test/scripts/test_examples.js index 66409ded..7f55f2a4 100644 --- a/test/scripts/test_examples.js +++ b/test/scripts/test_examples.js @@ -5,9 +5,6 @@ const { exec } = require("child_process"); const { file } = require("tmp-promise"); const { writeFile } = require("fs-extra"); const toneJson = require("../../docs/tone.json"); -const eachLimit = require("async/eachLimit"); -const os = require("os"); -const cpuCount = os.cpus().length; /** * Get all of the examples @@ -75,7 +72,8 @@ async function testExampleString(str) { async function main() { const examples = findExamples(toneJson); let passed = 0; - await eachLimit(examples, cpuCount, async (example) => { + for (let i = 0; i < examples.length; i++) { + const example = examples[i]; try { await testExampleString(example); passed++; @@ -89,7 +87,7 @@ async function main() { console.log(example + "\n" + e); throw e; } - }); + } console.log(`\nvalid examples ${passed}/${examples.length}`); if (passed !== examples.length) { throw new Error("didn't pass all tests");