From 9bd2af956f6f4e7399f41ccac4b1655a014f2bf1 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Wed, 9 Oct 2024 15:01:51 +0200 Subject: [PATCH] chore: use unique names ids for dynamic tests --- src/worker/collect.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/worker/collect.ts b/src/worker/collect.ts index a2047f5..2bd0c56 100644 --- a/src/worker/collect.ts +++ b/src/worker/collect.ts @@ -305,6 +305,7 @@ export async function astCollectTests( false, ctx.config.allowOnly, ) + markDynamicTests(file.tasks) if (!file.tasks.length) { file.result = { state: 'fail', @@ -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