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 tests #1170

Merged
merged 2 commits into from
Apr 10, 2018
Merged

Fix tests #1170

merged 2 commits into from
Apr 10, 2018

Conversation

BridgeAR
Copy link
Contributor

This came up in CITGM while improving assert.throws in Node.js. See nodejs/node#19867 for more information.

The current tests never checked for the error message and instead, the error message would have been returned, just the same as if there would be no second argument at all.

This makes sure the error message is actually tested for.

Since I just looked at the code, I also added another commit to remove all assert.doesNotThrow calls. Those are always unnecessary. They do not provide any benefit since in case of an error it will just catch the error and rethrow.

So far the error message was not tested at all. This change makes
sure the error will actually be tested for.
`assert.doesNotThrow` does not provide any benefit since it will
only catch errors and then rethrow in case of an error.
@codecov
Copy link

codecov bot commented Apr 10, 2018

Codecov Report

Merging #1170 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1170   +/-   ##
=======================================
  Coverage   99.73%   99.73%           
=======================================
  Files           5        5           
  Lines         374      374           
=======================================
  Hits          373      373           
  Misses          1        1

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 8c17517...a3426d7. Read the comment docs.

@jonathanong
Copy link
Member

👍 thanks

@jonathanong jonathanong merged commit 13086d2 into koajs:master Apr 10, 2018
@fl0w fl0w mentioned this pull request Apr 26, 2018
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