Skip to content

Commit

Permalink
fix test suite chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Aug 14, 2023
1 parent 04450c6 commit cf17631
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/src/snippets.ts
Expand Up @@ -11,6 +11,7 @@ export interface SnippetsOptions {
}

const snipFolder = "devs/snippets"
const MAX_SNIPPETS_PER_FILE = 30

export async function snippets(options: SnippetsOptions) {
const files = await glob(options.include, {
Expand Down Expand Up @@ -55,7 +56,7 @@ export async function snippets(options: SnippetsOptions) {
await writeFile(fullname, snip)
imports += `import "./${mod}"\n`
numsnip++
if (numsnip % 100 == 0) {
if (numsnip % MAX_SNIPPETS_PER_FILE == 0) {
allImports.push(imports)
imports = ""
}
Expand Down

0 comments on commit cf17631

Please sign in to comment.