-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix automock for numeric function names #7653
Conversation
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.
Thanks! I was unaware we already had logic for this, turned out really clean
expect( | ||
getMockFnWithOriginalName('foo𠮷bar').name === 'foo𠮷bar', | ||
).toBeTruthy(); | ||
expect(getMockFnWithOriginalName('1').name).toBe('$1'); |
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.
good call
Co-Authored-By: jeysal <[email protected]>
…m-runtime * upstream/master: add missing truncate comment to recent blog posts (jestjs#7655) use raw serializer for e2e output snapshots (jestjs#7651) chore: use a Set for reserved words list in `jest-mock` Fix automock for numeric function names (jestjs#7653) Update docs re: `moduleFileExtensions` to add ordering note (left-to-right) (jestjs#7616)
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Fixes #7624
Test plan
Added one assertion for the name itself and
added one test case that should closely resembles #7624