Skip to content

Commit

Permalink
chore: use unique names ids for dynamic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Oct 9, 2024
1 parent 90bf9ba commit 9bd2af9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/worker/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export async function astCollectTests(
false,
ctx.config.allowOnly,
)
markDynamicTests(file.tasks)
if (!file.tasks.length) {
file.result = {
state: 'fail',
Expand Down Expand Up @@ -411,6 +412,17 @@ function interpretTaskModes(
}
}

function markDynamicTests(tasks: TaskBase[]) {
for (const task of tasks) {
if ((task as any).dynamic) {
task.id += '-dynamic'
}
if ('children' in task) {
markDynamicTests(task.children as TaskBase[])
}
}
}

function checkAllowOnly(task: TaskBase, allowOnly?: boolean) {
if (allowOnly) {
return
Expand Down

0 comments on commit 9bd2af9

Please sign in to comment.