-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
tests: better display value tests with i18n #5720
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.
I knew jest was a going to be a trojan horse for expect(whatever).to.need.a.silly.assertion(true)
:P
This works for me for #5716, if the rest are copied over?
typings/externs.d.ts
Outdated
@@ -184,3 +184,9 @@ declare global { | |||
} | |||
} | |||
} | |||
|
|||
declare namespace jest { |
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.
looks unnecessary?
lighthouse-core/test/test-utils.js
Outdated
|
||
expect.extend({ | ||
toHaveDisplayValue(received, expected) { | ||
const obj = {displayValue: received.displayValue}; |
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.
it looks like this and logging is the only displayValue
specific stuff in here. Do we want a more generalized toHaveLocalizedWhatever()
?
yep 👍 |
9f3191e
to
4cd5d26
Compare
@brendankenny we do this post #5716 ?