-
Notifications
You must be signed in to change notification settings - Fork 179
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
Configure Jest for TypeScript #12167
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
||
if (!sizes) { | ||
return normalizedSizes; | ||
} | ||
|
||
for (const size of Object.keys(sizes)) { | ||
const data = sizes[size]; | ||
|
||
if (!data.width || !data.height || !data.sourceUrl) { |
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.
This might help with #12485, because that one looks like an issue with trying to do replaceAll()
an undefined/null sourceUrl
Size Change: +96 B (0%) Total Size: 2.72 MB
ℹ️ View Unchanged
|
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import type { OrderedSet } from 'immutable'; |
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.
Isn't this external dependencies
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.
In tests. Is there any downside to 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.
There is a lot of code here. It looks good to me. I like how the code quality improvements.
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.
Not caused by this PR but while reviewing found these warning in the test run(s)
Might some quick fixes while your in here (or new issues for later as you see fit):
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.
LG, I ran some tests locally.
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.
I'm loving this. I especially like how many irrelevant tests and slightly off typings (missing union, etc) they reveal!
I only have some minor comments, but I guess most of them are "why aren't things different" 😂
Context
So that we can write tests in TypeScripts if desired. See #12097
Summary
Relevant Technical Choices
To-do
User-facing changes
None
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
No
Does this PR change what data or activity we track or use?
No
Does this PR have a legal-related impact?
No
Checklist
Type: XYZ
label to the PRFixes #12097