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: disable colors in test-assert.js #20695

Merged
merged 3 commits into from
May 15, 2018
Merged

test: disable colors in test-assert.js #20695

merged 3 commits into from
May 15, 2018

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented May 13, 2018

When test/parallel/test-assert.js is run with a TTY as stdout, color codes in assertion messages cause the test to fail. This commit disables colors when stdout is a TTY.

Fixes: #18967

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 13, 2018
@lpinca
Copy link
Member

lpinca commented May 13, 2018

@lpinca lpinca added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 13, 2018
@BridgeAR
Copy link
Member

Is this the only issue here? Can we please verify that all parallel/test-assert* tests pass? Because at least parallel/test-assert-deep.js should definitely fail if it is about the colors.

@cjihrig
Copy link
Contributor Author

cjihrig commented May 13, 2018

I had only looked into test-assert.js because that one had the open issue. I just went through the other assert tests and fixed the other two that are broken due to colors.

UPDATE: New CI that was good: https://ci.nodejs.org/job/node-test-pull-request/14875/

@BridgeAR
Copy link
Member

@cjihrig I guess those are all that fail but would you be so kind and just run the whole test suite once nevertheless? Some message tests could for example also fail but who knows if there are some other ones that could also fail.

@cjihrig
Copy link
Contributor Author

cjihrig commented May 13, 2018

Is there a way to run the whole test suite with a TTY as stdout? I've never needed to do that before, so I'm not sure how.

cjihrig added 3 commits May 14, 2018 23:39
When test/parallel/test-assert.js is run with a TTY as stdout,
color codes in assertion messages cause the test to fail. This
commit disables colors when stdout is a TTY.

Fixes: nodejs#18967
PR-URL: nodejs#20695
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
When test/parallel/test-assert-deep.js is run with a TTY as
stdout, color codes in assertion messages cause the test to fail.
This commit disables colors when stdout is a TTY.

PR-URL: nodejs#20695
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
When test/parallel/test-assert-checktag.js is run with a TTY
as stdout, color codes in assertion messages cause the test to
fail. This commit disables colors when stdout is a TTY.

PR-URL: nodejs#20695
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@cjihrig cjihrig merged commit ee2a770 into nodejs:master May 15, 2018
@cjihrig
Copy link
Contributor Author

cjihrig commented May 15, 2018

Landed in b570485, ee2a770, and 7597d45.

@cjihrig cjihrig deleted the colors branch May 15, 2018 03:41
MylesBorins pushed a commit that referenced this pull request May 22, 2018
When test/parallel/test-assert.js is run with a TTY as stdout,
color codes in assertion messages cause the test to fail. This
commit disables colors when stdout is a TTY.

Fixes: #18967
PR-URL: #20695
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 22, 2018
When test/parallel/test-assert-deep.js is run with a TTY as
stdout, color codes in assertion messages cause the test to fail.
This commit disables colors when stdout is a TTY.

PR-URL: #20695
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request May 22, 2018
When test/parallel/test-assert-checktag.js is run with a TTY
as stdout, color codes in assertion messages cause the test to
fail. This commit disables colors when stdout is a TTY.

PR-URL: #20695
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@addaleax addaleax mentioned this pull request May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants