Skip to content

Commit 6aeb903

Browse files
committed
refactor(@angular/build): make runner optional in unit-test builder
The `runner` option in the `unit-test` builder is now optional to streamline the user configuration. If the `runner` option is not provided, the builder now defaults to using the `vitest` value. The builder's schema has been updated to reflect this change by removing `runner` from the required properties and updating its entry to document the new default behavior.
1 parent 18bf8e7 commit 6aeb903

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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
@@ -82,7 +82,7 @@ export async function normalizeOptions(
8282
include: options.include ?? ['**/*.spec.ts'],
8383
exclude: options.exclude,
8484
filter,
85-
runnerName: runner,
85+
runnerName: runner ?? 'vitest',
8686
coverage: options.coverage
8787
? {
8888
all: options.coverageAll,

packages/angular/build/src/builders/unit-test/schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"runner": {
1717
"type": "string",
1818
"description": "Specifies the test runner to use for test execution.",
19+
"default": "vitest",
1920
"enum": ["karma", "vitest"]
2021
},
2122
"browsers": {
@@ -267,5 +268,5 @@
267268
}
268269
},
269270
"additionalProperties": false,
270-
"required": ["runner"]
271+
"required": []
271272
}

0 commit comments

Comments
 (0)