Component testing will fail with Angular 15 workspaces due to a change in Angular's build and test options API for polyfills, which has changed from string to Polyfills which is a type alias for string[] | string.
The current error is:
Your configFile threw an error from: cypress.config.ts
We stopped running your tests because your config file crashed.
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array
Current behavior
Component testing will fail with Angular 15 workspaces due to a change in Angular's build and test options API for polyfills, which has changed from
string
toPolyfills
which is a type alias forstring[] | string
.The current error is:
You can see this in our Nx Cloud run for Angular 15 support branch: https://staging.nx.app/runs/2PyEc1jfqo6/task/e2e-angular-extensions:e2e
If you do a Find in Page and search for "fail" you'll see the error output.
Desired behavior
Component testing should work correctly for Angular 15 workspaces.
Test code to reproduce
Create an "Angular 15"* Workspace.
npx @angular/cli@next new myapp
Add component testing.
Try to run component tests.
Cypress Version
latest
Node version
v16
Operating System
All
Debug Logs
No response
Other
No response