Skip to content

Commit

Permalink
create index for jsontests
Browse files Browse the repository at this point in the history
Dynamically generate a file that lists all test suites in
I don't know how `async_schemas.spec.ts` worked before this.
  • Loading branch information
rotu committed Apr 6, 2024
1 parent 5370b84 commit 7b34db3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/jsontests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")}]
`)

0 comments on commit 7b34db3

Please sign in to comment.