You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(@angular/build): support extra test setup files with unit-test vitest runner
When using the experimental unit-test builder with Vitest, a new `setupFiles`
option is now available. This option is similar to the Vitest option in
that it allows for setup and configuration prior to each test. The `setupFiles`
are executed after any application polyfills as well as after the TestBed
initialization. If custom TestBed initialization is needed (this is not typical),
The TestBed environment can first be reset in a setupFile and then initialized
as needed. Note that resetting the TestBed environment in this way will
cause the `providersFile` to no longer add any providers to the tests and
any custom providers would need to be manually added during initialization.
"description": "TypeScript file that exports an array of Angular providers to use during test execution. The array must be a default export.",
94
101
"minLength": 1
102
+
},
103
+
"setupFiles": {
104
+
"type": "array",
105
+
"items": {
106
+
"type": "string"
107
+
},
108
+
"description": "A list of global setup and configuration files that are included before the test files. The application's polyfills are always included before these files. The Angular Testbed is also initialized prior to the execution of these files."
0 commit comments