-
Notifications
You must be signed in to change notification settings - Fork 12k
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
New Jest integration doesn't work with stylePreprocessorOptions #25131
Comments
I'm surprised this is compiling anything related to stylesheets, we deliberately skip all that with Jest since it isn't needed. |
Had to use relative imports, instead of alias to even start jest.
|
We could probably still try to pass it for now since |
I can confirm we face this issue in our project as well but we use |
been here done that, lurking |
Alright, that renders this experimental feature useless in my case. I have to maintain multiple libraries with collections of mixins and functions. Using Also, styles are a crucial part of a component's behavior. Removing them from the context of a test is a mistake imho. |
I get the same scss import errors on various @use statements (which work with the
I would be interrested where in the angular-cli codebase the removal of css happens. I tried reading through it, but it's beyond my ability to fully comprehend :) Could you or someone point that out? |
I face the same problem, but isn't there a way to exclude all scss files (temporarily at least) ? |
I have the same problem, any solution? |
You could temporarily |
I'm facing this issue too, since it doesn't affects the execution of my tests and just experiencing the console errors. Switching to absolute routes fixes the original issue, but would be nice to have the stylePreprocessorOptions available. |
Same issue here! |
Reviving this thread, for me the error happens at compilation time (before running the tests) Can't complain about it since it's experimental, but a fix would be awesome ! |
Command
test
Is this a regression?
The previous version in which this bug was not present was
No response
Description
New test builder
@angular-devkit/build-angular:jest
doesn't work with configuredstylePreprocessorOptions
option in build.Minimal Reproduction
First add:
"builder": "@angular-devkit/build-angular:jest",
stylePreprocessorOptions
withincludePaths
ng test
or here is the repo:
https://github.com/Varixo/angular-jest-stylepreprocessoroptions-error
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: