Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
new_audit(pwa): maskable icon audit #10370
new_audit(pwa): maskable icon audit #10370
Changes from 7 commits
0263b06
24bdafc
6932590
37549e4
186095a
3b214e0
838df46
3f291bb
dd820b1
81c3850
69b5c76
f7c1619
4b701b8
08d8b16
8c091e7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 like the default is
"any"
if we want to stick to the specThere 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.
🚨 totally optional personal appeal below 🚨
since this is a brand new test file I'll attempt to pitch you on why new tests should use expect instead of assert :)
while it has pretty much no impact on this particular file,
expect
gives us some nice powers over assert, namelyexpect({foo: 1, ...giantListOfOtherProperties}).toMatchObject({foo: 1})
will pass and on failure still print out the rest of the object for better debuggingexpect(arr).toHaveLength(5)
will print the contents of the array on failure for debugging instead of just sayingExpected 5 got 4
expect(someObject).toMatchInlineSnapshot()
is super handy for tests where we don't necessarily have an absolute correct answer but we want to be aware when anything affects the behavior (think lantern metrics, complicated byte or time savings estimation logic, etc) jest automatically manages these golden file expectations inline and can update them with the-u
flag to jestexpect(jest.fn()).toHaveBeenCalledWith('foo')
, much easier to read and grok than the manual mock functions we have crafted elsewhere withassert
on the whole, most of the codebase is still
assert
and when adding individual tests that don't benefit fromexpect
to thsoe files, totally expected to follow the surrounding style, but in new places where we might want to reap the benefits of expect I strongly support the useexpect
and that's my spiel, feel free to decide for yourself moving forward when to use what appropriately :)
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.
You've sold me! Made the switch.