-
Notifications
You must be signed in to change notification settings - Fork 309
feat: add automatic mock for angular entities (#2908) #2953
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
base: main
Are you sure you want to change the base?
Conversation
26f4a39
to
39f1670
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Hi, about this, I think we should have
|
.prettierrc
Outdated
@@ -1,7 +1,7 @@ | |||
semi: true | |||
printWidth: 120 | |||
singleQuote: true | |||
tabWidth: 2 |
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.
Would you pls revert this?
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.
Why? Eslint enforces to 4
Another thing is about documentation for this new feature, potentially a new file in https://github.com/thymikee/jest-preset-angular/tree/main/website/docs/guides |
This comment was marked as resolved.
This comment was marked as resolved.
Which test command did you run? Did you try with |
|
This comment was marked as resolved.
This comment was marked as resolved.
cb2c11a
to
2df83d3
Compare
@ahnpnl Since we have single cjs bundle, any imports (that replaced to
You can check this by run e2e esm tests. Do you have any idea how to deal with that? |
2df83d3
to
af8d680
Compare
af8d680
to
010d2a5
Compare
Summary
Currently, to mock Angular components, services, pipes, directives, and modules, we need to manually create stubs for them. This PR introduces a new way to automatically mock them. The process can be simplified as follows:
Test plan
Does this PR introduce a breaking change?
TODO
setupAutoMocks
function__mocks__
)Closes: #2908