Make error message more descriptive
See original GitHub issueSometimes error messages for hash comparison looks like that
expect(data.pagination).to.eql
currentPage : 2
perPage : 3
pagesCount : 3
currentPagePath : '/tag/News?page=2'
firstPagePath : '/tag/News'
previousPagePath : '/tag/News'
nextPagePath : '/tag/News?page=3'
lastPagePath : '/tag/News?page=3'
expected { Object (currentPage, perPage, ...) } to deeply equal { Object (currentPage, perPage, ...) }
looking at such message it’s hard to understand what’s wrong there.
Maybe add more details?
Issue Analytics
- State:
- Created 11 years ago
- Comments:20 (9 by maintainers)
Top Results From Across the Web
How to Write Good Error Messages - UX Planet
Be concise and write a short description that is meaningful for user and gives him a clear idea of the problem and how...
Read more >Descriptive Error Messages - DevIQ
When something unexpected or exceptional happens in a software application, usually an error message is displayed to the user and/or logged somewhere for...
Read more >Best 10 Examples And Guidelines For Error Messages
Here are ten basic guidelines to help you create the most effective error messaging for your users. Click here to see all of...
Read more >Error Messages: Examples, Best Practices & Common Mistakes
Useful error messages can keep users on your site and increase conversions. See examples and learn the best practices.
Read more >How to Write & Design User-Friendly Error Messages
1. Clarity is key ... When it comes to writing error messages, clarity is your top priority. You need to describe what happened,...
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 FreeTop 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
Top GitHub Comments
Based on this StackOverflow answer, I believe the issue was occuring for me because my tests were asynchronous.
I got diffs working correctly again by using the following pattern:
@paulyoung yes same thing for me, “DONT forget to return that PROMISE!”