Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c7f2cb5

Browse filesBrowse files
committed
fix(@angular/build): provide vitest globals in unit-test builder
The experimental `unit-test` builder with the `vitest` runner now provides the test APIs also as globals. This increases the potential compatibility for existing karma/jasmine based tests. The initial unit tests within a newly generated application, for instance, now require no changes to execute with the new builder. (cherry picked from commit 7b8c9af)
1 parent cb9d605 commit c7f2cb5
Copy full SHA for c7f2cb5

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

‎packages/angular/build/src/builders/unit-test/builder.ts

Copy file name to clipboardExpand all lines: packages/angular/build/src/builders/unit-test/builder.ts
+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ export async function* execute(
213213
instance ??= await startVitest('test', undefined /* cliFilters */, undefined /* options */, {
214214
test: {
215215
root: outputPath,
216+
globals: true,
216217
setupFiles,
217218
// Use `jsdom` if no browsers are explicitly configured.
218219
// `node` is effectively no "environment" and the default.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.