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

test: increase coverage of process.emitWarning #9556

Merged
merged 0 commits into from
Nov 15, 2016

Conversation

Fishrock123
Copy link
Contributor

@Fishrock123 Fishrock123 commented Nov 11, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test, process

Description of change

Previously our tests did not check these codepaths as seen at
coverage.nodejs.org

See https://coverage.nodejs.org/coverage-fb05e31466ac0bad/root/internal/process/warning.js.html

Ci: https://ci.nodejs.org/job/node-test-pull-request/4825/

(This patch was made live during https://www.twitch.tv/nodesource/v/100431274 if you'd like to see me working on this in retrospect. :P)

@Fishrock123 Fishrock123 added process Issues and PRs related to the process subsystem. test Issues and PRs related to the tests. labels Nov 11, 2016
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -24,6 +26,10 @@ function CustomWarning() {
util.inherits(CustomWarning, Error);
process.emitWarning(new CustomWarning());

const warningNoToString = new CustomWarning();
warningNoToString.toString = null;
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should also handle cases where toString() is a function but throws?

@Fishrock123
Copy link
Contributor Author

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Yup, still LGTM :)

@Fishrock123 Fishrock123 deleted the process-warnings-coverage branch November 15, 2016 14:21
@Fishrock123 Fishrock123 merged commit 9e698bd into nodejs:master Nov 15, 2016
addaleax pushed a commit that referenced this pull request Nov 22, 2016
Previously our tests did not check these codepaths as seen at
coverage.nodejs.org

PR-URL: #9556
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
Previously our tests did not check these codepaths as seen at
coverage.nodejs.org

PR-URL: nodejs#9556
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
Previously our tests did not check these codepaths as seen at
coverage.nodejs.org

PR-URL: #9556
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process Issues and PRs related to the process subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants