-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test: improve coverage of the util module #8633
Conversation
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.
LGTM if the CI is happy
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.
LGTM
process.on('warning', common.mustCall((warning) => { | ||
assert.strictEqual(warning.name, 'DeprecationWarning'); | ||
assert.notStrictEqual(expected.indexOf(warning.message), -1, | ||
`unexpected error message: "${warning.message}"`); |
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.
nit: I think assert.ok
+ .includes()
might be more intuitive than .indexOf() !== -1
here.
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 am working on a refactoring of all tests for deprecation warnings, including this one. I'll include your proposal in it.
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.
LGTM
LGTM |
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: nodejs#8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
99ac503
to
ebbd5cb
Compare
Landed in ebbd5cb |
@targos should this be backported? |
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: nodejs#8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Backport: #8970 |
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: #8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: #8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: #8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: #8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Add tests for untested branches and statements. Change assert.equal to assert.strictEqual for consistency. PR-URL: #8633 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
util
Description of change
Add tests for untested branches and statements.
Change assert.equal to assert.strictEqual for consistency
/cc @nodejs/testing