User experience for showing failed assertions
See original GitHub issueFollowing up with https://github.com/GoogleChrome/lighthouse-ci/pull/97 and moving discussion here before creating one more PR 😃
Some of the users are running into an issues when failed assertion results for resource-summary
are not transparent when comparing with budget (for example - treosh/lighthouse-ci-action#13, part of the problem is fixed via #97).
E.g. I setup budget for 1KB, but actual value is ~17387 bytes. What will be seen in console is something like this:
expected: <=100
found: 17387
For better UX, I propose something like we have in LH:
expected: <=1.00 KB
found: 16.98 KB
Here is comparison of logs before and after the proposal:
We actually need to define:
- are we ok with
KB
? - what fields has to be transformed:
resource-summary
, others?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Yes, UX research is valid: How to handle assertions it's not ...
Yes, UX research is valid: How to handle assertions it's not real research. You've watched 5 participants all struggle to use a component...
Read more >Expected Failures | Apple Developer Documentation
If any assertions fail in a test after you call XCTExpectFailure , Xcode marks the test as an expected failure instead of a...
Read more >Is Assert.Fail() considered bad practice? - unit testing
All those tests must fail, to be correct tests: So you want to achieve two things: 1) Verify that your implementation is correct;...
Read more >Programming With Assertions - Oracle Help Center
Experience has shown that writing assertions while programming is one of the quickest ... Note that the detail message is not a user-level...
Read more >Assertion Failed Dialog Box - Visual Studio (Windows)
An assertion statement specifies a condition that you expect to hold true at some particular point in your program. If that condition does...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In 6.0 we finally have
numericUnit
so we can address this.@exterkamp I think that’s slightly different because all the units are available for those numbers (we just don’t use them responsibly 😃. I added a note in https://github.com/GoogleChrome/lighthouse/issues/7238#issuecomment-554758706 about solving that using the new
Intl.NumberFormat
unit formatting that came with Node 12.13 (the new LTS).