Skip to content

Commit f17ed30

Browse files
committed
fix(@angular/build): treat empty browsers array as undefined in unit-test builder
Ensure that an empty `browsers` array is treated as `undefined` during the option normalization process. This allows the unit-test builder to properly fall back to the Node.js/jsdom environment for Vitest, and allows the Karma runner to use its default configuration. Closes #32652
1 parent ac065ad commit f17ed30

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

packages/angular/build/src/builders/unit-test/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export async function normalizeOptions(
116116
buildProgress: progress,
117117
reporters: normalizeReporterOption(options.reporters),
118118
outputFile: options.outputFile,
119-
browsers,
119+
browsers: browsers?.length ? browsers : undefined,
120120
browserViewport: width && height ? { width, height } : undefined,
121121
watch,
122122
debug: options.debug ?? false,

0 commit comments

Comments
 (0)