From 7b34db3b6dc1e325fdb4897a208b0af5e8eeadc3 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 6 Apr 2024 15:15:56 -0500 Subject: [PATCH 1/2] create index for jsontests Dynamically generate a file that lists all test suites in I don't know how `async_schemas.spec.ts` worked before this. --- scripts/jsontests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/jsontests.js b/scripts/jsontests.js index 24ef40822..5e70e15ba 100644 --- a/scripts/jsontests.js +++ b/scripts/jsontests.js @@ -30,3 +30,9 @@ for (const suite in testSuitePaths) { .reduce((list, f) => list + f) fs.writeFileSync(`./spec/_json/${suite}.js`, `module.exports = [${code}\n]\n`) } + +const requires = Array.from(Object.keys(testSuitePaths), (s) => `require('./${s}')`) +fs.writeFileSync(`./spec/_json/index.js`, ` + // generated from ${__filename} + module.exports = [${requires.join(",\n")}] +`) From 7beb78c325a7308b824461ca0c60ed917dcbaa95 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 6 Apr 2024 15:31:53 -0500 Subject: [PATCH 2/2] prettier --- scripts/jsontests.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/jsontests.js b/scripts/jsontests.js index 5e70e15ba..a525af392 100644 --- a/scripts/jsontests.js +++ b/scripts/jsontests.js @@ -32,7 +32,9 @@ for (const suite in testSuitePaths) { } const requires = Array.from(Object.keys(testSuitePaths), (s) => `require('./${s}')`) -fs.writeFileSync(`./spec/_json/index.js`, ` - // generated from ${__filename} +fs.writeFileSync( + `./spec/_json/index.js`, + `// generated from ${__filename} module.exports = [${requires.join(",\n")}] -`) +` +)