Skip to content

test: improve console coverage to check ignoreErrors - #11531

Closed
yoichi-watanabe wants to merge 1 commit into
nodejs:masterfrom
yoichi-watanabe:test_improve_console
Closed

test: improve console coverage to check ignoreErrors#11531
yoichi-watanabe wants to merge 1 commit into
nodejs:masterfrom
yoichi-watanabe:test_improve_console

Conversation

@yoichi-watanabe

@yoichi-watanabeyoichi-watanabe commented Feb 24, 2017

Copy link
Copy Markdown

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Feb 24, 2017
@mscdexmscdex added the console Issues and PRs related to the console subsystem. label Feb 24, 2017
@Trott

Copy link
Copy Markdown
Member

@nodejs/testing

const { Writable } = require('stream');
const assert = require('assert');
const ignoreErrors = false;
const expected = 'foobarbaz';

Copy link
Copy Markdown
Contributor

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.

@cjihrigcjihrig mentioned this pull request Mar 2, 2017
3 tasks
});
const c = new Console(err, err, ignoreErrors);
c.log(expected);
}, /^Error: foobar$/); No newline at end of file

Copy link
Copy Markdown
Contributor

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) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused parameters.

@jasnell

Copy link
Copy Markdown
Member

ping @chipstar :-)

@BridgeAR

Copy link
Copy Markdown
Member

Ping @yoichi-watanabe

@jasnelljasnell added the stalled Issues and PRs that are stalled. label Aug 29, 2017
@BridgeAR

Copy link
Copy Markdown
Member

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!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consoleIssues and PRs related to the console subsystem.stalledIssues and PRs that are stalled.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@yoichi-watanabe@Trott@jasnell@BridgeAR@thefourtheye@cjihrig@mscdex@nodejs-github-bot