Skip to content

Commit b50177a

Browse files
committed
fix(@angular/build): ensure correct project targeting during Vitest debugging
This addresses issue angular#31652 where debugging failed to target the correct project instance. When running browser tests, Vitest appends the browser name to the project identifier. This change updates the CLI to match that naming convention when initiating a debug session, ensuring the correct project is selected. Fixes angular#31652
1 parent 164e7db commit b50177a

File tree

1 file changed

+4
-1
lines changed
  • packages/angular/build/src/builders/unit-test/runners/vitest

1 file changed

+4
-1
lines changed

packages/angular/build/src/builders/unit-test/runners/vitest/executor.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ export class VitestExecutor implements TestExecutor {
215215
{
216216
config: externalConfigPath,
217217
root: workspaceRoot,
218-
project: projectName,
218+
project:
219+
debug && browserOptions.browser?.instances
220+
? `${projectName} (${browserOptions.browser.instances[0].browser})`
221+
: projectName,
219222
outputFile,
220223
cache: cacheOptions.enabled ? undefined : false,
221224
testNamePattern: this.options.filter,

0 commit comments

Comments
 (0)