question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User experience for showing failed assertions

See original GitHub issue

Following 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:

image

We actually need to define:

  • are we ok with KB?
  • what fields has to be transformed: resource-summary, others?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, May 21, 2020

In 6.0 we finally have numericUnit so we can address this.

1reaction
brendankennycommented, Nov 17, 2019

@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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found