-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: improve tests for util.inherits #3507
Conversation
inherits is used in lib and tests but its functionality itself is not tested yet.
|
Good point, done! |
assert.throws(function() { util.inherits(ctor, {}); }, TypeError); | ||
assert.throws(function() { util.inherits(ctor, null); }, TypeError); | ||
assert.throws(function() { util.inherits(null, ctor); }, TypeError); | ||
assert.doesNotThrow(function() { util.inherits(ctor, ctor); }, TypeError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is removed in favour of #3455?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. I think this line was added to make sure inherits doesn't throw when two constructors are passed to it. Now it is implicitly tested with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. Thanks :)
LGTM |
inherits is used in lib and tests but its functionality itself is not tested yet. PR-URL: #3507 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Thanks, landed in df738ac. |
inherits is used in lib and tests but its functionality itself is not tested yet. PR-URL: #3507 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@jasnell I think this can go in v4.x |
inherits is used in lib and tests but its functionality itself is not tested yet. PR-URL: #3507 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Landed in v4.x-staging in 12d8385 |
inherits is used in lib and tests but its functionality itself is not tested yet. PR-URL: #3507 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
inherits is used in lib and tests but its functionality itself is not
tested yet.
This is preparation for PR #3455 so I can add more tests to it.