-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
docs: add Angular CLI example #227
Conversation
✅ Deploy Preview for jest-preview-library canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @LayZeeDK very much for your wonderful PR. I hope that there are more Angular folks will use jest-preview
to save their time after your PR.
I left some feedback. I can brief those:
- Rename current README to
README-angular.md
then addREADME.md
to instruct integratingjest-preview
to an Angular project. - Update
jest.config.js
to- Better Intellisense
- Add CSS processor
- Add file processor
- Only watch file in
src
(by addingroots
)
- Add test watch mode to
package.json
- Include "counter" when
ng serve
- Can you add a sample of using CSS and Sass?
- Can you add an image using URL (beside base64)?
- import CSS file directly in
src/test-setup.ts
to support styling.jest-preview/transforms/css
will handle it for you
Again. Thank you very much. Please let me know if you want to discuss anything regarding my feedback. Thanks.
I see, I left a comment in the feedback above. You can use CSS file transform, then import
Sorry, I haven't got your point. (Please forgive me I haven't had a chance to use Angular in production yet)
That would be awesome. Currently, all existing examples are using |
Angular has two runtime modes:
The I'm not sure how to instruct the |
150ab86
to
bf8e533
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @LayZeeDK. Thank you for your updates. You resolved all the suggestions I made before. I ran the example and I think it's good for now.
Even though the styles are not fully processed. We can work around by #237 until jest-preview
can support it natively.
Your PR looks good to me. Please mark the PR as ready, I will merge it right after this. I can do the workaround with styleUrls
after merging this PR (You are welcome if you want to import those CSS files directly).
Again, thank you very much for your help.
@nvh95 |
e935097
to
2e48331
Compare
@LayZeeDK 🚀🚀 |
I've put up a pull request to add @LayZeeDK! 🎉 |
Summary/ Motivation (TLDR;)
Add an Angular CLI example to the repository.
Related issues
@nvh95 @ntt261298
Here's an example using Angular CLI with Jest via @angular-builders/jest.