diff --git a/test/detect/index.js b/test/detect/index.js index cc317e2e9f..4f77e09050 100644 --- a/test/detect/index.js +++ b/test/detect/index.js @@ -33,7 +33,8 @@ function testAutoDetection(language, { detectPath }) { describe('hljs.highlightAuto()', () => { before(async function() { - const thirdPartyPackages = await getThirdPartyPackages(); + const thirdPartyPackages = []; + for await(const pkg of getThirdPartyPackages()) thirdPartyPackages.push(pkg); const languages = hljs.listLanguages(); describe(`hljs.highlightAuto()`, function() { diff --git a/test/markup/index.js b/test/markup/index.js index f653976082..7c96049fe9 100644 --- a/test/markup/index.js +++ b/test/markup/index.js @@ -50,12 +50,11 @@ describe('highlight() markup', async() => { languages.forEach(testLanguage); } - const thirdPartyPackages = await getThirdPartyPackages(); - thirdPartyPackages.forEach( - (pkg) => pkg.names.forEach( + for await(const pkg of getThirdPartyPackages()) { + pkg.names.forEach( (name, idx) => testLanguage(name, { testDir: pkg.markupTestPaths[idx] }) - ) - ); + ); + } }); it("adding dynamic tests...", async function() {}); // this is required to work