-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular Vitest isn't working with Material Harnesses #1440
Comments
Thanks for the reproduction @k3nsei. The fix is to add
This fixes the running the tests in Node. We can add this to our internal list when running tests. Still looking into the browser tests |
@brandonroberts could you detect if |
We could, but it doesn't have to be dynamic. It has no impact if you don't use material even if we include it |
@k3nsei adding this to the optimizeDeps: {
include: ['tslib', '@angular/cdk/testing/testbed'],
exclude: ['@angular/cdk/testing']
}, |
From my point of view it would be nice if things just worked like with Anyway thanks for your help and all your work. |
I agree, the goal is to have most common use cases covered out of the box. I didn't think anything special was needed for angular material. We'll ensure Angular Material/CDK is supported without manual configuration |
@brandonroberts now tests in monorepo stopped working as paths are incorrect. They are not points to PS. I do not think this error saying what is really happening. My intuition telling me that basically Formly cannot access it dependency which is
|
@k3nsei this issue here with the older ssr: {
noExternal: [/fesm2015/]
}, |
@brandonroberts Is this related to latest changes? As with previous version it was working. Anyway it helped. Thanks again. |
Please provide the environment you discovered this bug in.
https://stackblitz.com/edit/angular-material-harnesses-vitest-j2urq?file=src%2Fapp%2Fautocomplete%2Fautocomplete.component.spec.ts
Which area/package is the issue in?
vitest-angular
Description
I want to migrate from Jest to Vitest in one of my angular projects. But the only thing that prevents me from doing so. Is that currently there are some issues with material harness support. Overlays don't show up in the DOM tree.
Please provide the exception or error you saw
Other information
Btw. When running tests in browser with
npm run test:browser
there are other issues thatangular-vitest
aren't able to inline CSS.I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: