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

Fix assert.equals referencing deprecated assert.defined #188

Merged
merged 1 commit into from
Mar 3, 2020
Merged

Fix assert.equals referencing deprecated assert.defined #188

merged 1 commit into from
Mar 3, 2020

Conversation

gundelsby
Copy link
Contributor

Purpose (TL;DR) - mandatory

Fix issue #184 by updating the assert.equals error message when using undefined as the expectation value.

How to verify - mandatory

  1. Check out this branch
  2. Check that the updated message text looks good (this PR does not change any logic)

Checklist for author

  • npm run lint passes
  • [X ] References to standard library functions are cached.

@codecov
Copy link

codecov bot commented Feb 27, 2020

Codecov Report

Merging #188 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #188   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           81        81           
  Lines          652       652           
=========================================
  Hits           652       652           
Flag Coverage Δ
#unit 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 ae5ba7c...0af24df. Read the comment docs.

@mantoni
Copy link
Member

mantoni commented Feb 27, 2020

Interesting. There doesn't seem to be a unit test coverting this. Would you care to add one?

@gundelsby
Copy link
Contributor Author

Interesting. There doesn't seem to be a unit test coverting this. Would you care to add one?

I don't really see the point of adding a unit test for this, to be honest. If the text needs to be updated in the future, a test won't help anyone remember that as it will pass until the message text is actually updated. And if someone changes the text, a test will fail and have to be updated - most likely by copy pasting the updated text into the unit test which then passes again.

@mantoni
Copy link
Member

mantoni commented Feb 27, 2020

That’s not the point. You’re right about the message validation. I‘m more surprised this code branch is not covered.

@gundelsby
Copy link
Contributor Author

Ah, right. Got you. I don't really have time for that right now, tbh.

@mantoni mantoni merged commit a02521c into sinonjs:master Mar 3, 2020
@mantoni
Copy link
Member

mantoni commented Mar 3, 2020

I checked and there are tests covering this, just not the error message. It's fine as is. Thank you for contributing! 🙏

Released in @sinonjs/referee@5.0.1.

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

Successfully merging this pull request may close these issues.

None yet

2 participants