-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 console coverage to check ignoreErrors #11531
test: improve console coverage to check ignoreErrors #11531
Conversation
@nodejs/testing |
const { Writable } = require('stream'); | ||
const assert = require('assert'); | ||
const ignoreErrors = false; | ||
const expected = 'foobarbaz'; |
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.
Could you either scope this to the first test, or name it something else. This isn't actually "expected" output in the second test.
}); | ||
const c = new Console(err, err, ignoreErrors); | ||
c.log(expected); | ||
}, /^Error: foobar$/); |
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.
Our linter will fail as there is no newline at the end of the file.
|
||
assert.throws(() => { | ||
const err = new Writable({ | ||
write: common.mustCall((chunk, enc, callback) => { |
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.
Unused parameters.
ping @chipstar :-) |
Ping @yoichi-watanabe |
Closing due to long inactivity. @yoichi-watanabe please feel free to leave a comment to open this PR again if you want to follow up on it or just open a new PR. I am sorry that your PR could not land as is and your work is much appreciated nevertheless! |
This PR can cover some uncovered lines on
lib/console.js
.see:https://coverage.nodejs.org/coverage-29ff16f04373d434/root/console.js.html
I checked
write
function if ignoreErrors is false.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test