From 3f1cc8b6fc3b68e904c2f1a2a59a071799b8b908 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Wed, 9 Oct 2024 14:07:07 +0200 Subject: [PATCH] fix: don't enqueue tests that are not part of the changeg file when continues mode triggers a rerun (#498) --- src/runner/runner.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/runner/runner.ts b/src/runner/runner.ts index d06c6a3..74be4a5 100644 --- a/src/runner/runner.ts +++ b/src/runner/runner.ts @@ -364,6 +364,12 @@ export class TestRunner extends vscode.Disposable { log.verbose?.(`Enqueuing "${test.label}"`) run.enqueued(test) } + if (testData instanceof TestFile) { + // ignore tests in another files, this is relevant for continuous runs + if (!files.includes(testData.filepath)) { + return + } + } test.children.forEach(enqueue) } testItems.forEach(test => enqueue(test)) -- 2.51.2