From 6dffe5efeb898d9b90b1f254d95ea4dcbbe93dfc Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 26 Jun 2021 11:29:55 +0200 Subject: [PATCH] fixup! Add back support for CJS extra languages --- test/detect/index.js | 3 ++- test/markup/index.js | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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