Skip to content
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

feat(toHaveValue): Enhanced error message with type information on loose equality #219

Conversation

maltebaer
Copy link
Contributor

@maltebaer maltebaer commented Mar 19, 2020

What:

As discussed in #218 the error message of toHaveValue was enhanced by type information if the received and expected value have loose equality.

Why:

To improve DX.

How:

The expected and received values are checked for loose equality and enhanced by type information if loose equality is given.

Checklist:

  • Documentation (N/A)
  • Tests
  • Updated Type Definitions (sorry, not so sure where to do that)
  • Ready to be merged (once updating of Type Definitions is done)

If you could point me to where I can update the Type Definitions, I would be happy to do so.

@codecov
Copy link

codecov bot commented Mar 19, 2020

Codecov Report

Merging #219 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #219   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          240       245    +5     
  Branches        58        59    +1     
=========================================
+ Hits           240       245    +5     
Impacted Files Coverage Δ
src/to-have-value.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c80448f...4ab63bd. Read the comment docs.

@maltebaer
Copy link
Contributor Author

Hey guys, could you give me some advice regarding the Type Definitions and why the checks are failing? When I run npm run validate locally everything passes and I'm don't really know what to get from the Job log on Travis CI.

@eps1lon
Copy link
Member

eps1lon commented Mar 24, 2020

Looks like this only fails with node 13. The branch is also out of date. Try updating it with master.

Then you can investigate by using node 13 locally. Should throw the same error.

@maltebaer
Copy link
Contributor Author

I updated to node 13.11.0 and it still doesn't fail locally. Updated with master too.

@eps1lon eps1lon changed the title Enhanced error message of toHaveValue feat(toHaveValue): Enhanced error message with type information on loose equality Mar 25, 2020
@maltebaer
Copy link
Contributor Author

Sorry to bother again, but when I try to commit the changes the husky > pre-commit hook fails.
I don't fully understand why or how to resolve this. To me it seems as if it is due to the formatting of the console output.

Can you give me a hint on how to solve this? Or is it okay to use the --no-verify flag in this case?

image

@eps1lon
Copy link
Member

eps1lon commented Mar 25, 2020

No idea. I have husky disabled globally anyway.

@eps1lon eps1lon merged commit eb51c17 into testing-library:master Mar 25, 2020
@eps1lon
Copy link
Member

eps1lon commented Mar 25, 2020

@all-contributors please add @mfelmy for code

@allcontributors
Copy link
Contributor

@eps1lon

I've put up a pull request to add @mfelmy! 🎉

@eps1lon
Copy link
Member

eps1lon commented Mar 25, 2020

@mfelmy Nice work, thanks!

@gnapse
Copy link
Member

gnapse commented Mar 25, 2020

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@maltebaer
Copy link
Contributor Author

Thank you very much for helping me on my first pull request.

@gnapse
Copy link
Member

gnapse commented Apr 9, 2020

@all-contributors please add @mfelmy for code, test

@allcontributors
Copy link
Contributor

@gnapse

I've put up a pull request to add @mfelmy! 🎉

@gnapse
Copy link
Member

gnapse commented Apr 9, 2020

@all-contributors please add @mfelmy for code, test

@allcontributors
Copy link
Contributor

@gnapse

I've put up a pull request to add @mfelmy! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants