Skip to content

Restore colors to test output#1341

Merged
ang-zeyu merged 1 commit into
MarkBind:masterfrom
ang-zeyu:restore-test-colors
Sep 5, 2020
Merged

Restore colors to test output#1341
ang-zeyu merged 1 commit into
MarkBind:masterfrom
ang-zeyu:restore-test-colors

Conversation

@ang-zeyu

@ang-zeyu ang-zeyu commented Sep 5, 2020

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [x] Bug fix: restore colors for tests' tty output

What is the rationale for this request?
#1291 switched over to lerna run for tests, which causes colors to be lost from test output in some instances.

What changes did you make? (Give an overview)

  • pass --colors to jest commands (which use chalk under the hood) to force color output there
  • set FORCE_COLOR env variable for chalk in our functional tests to force color output there as well

Proposed commit message: (wrap lines at 72 characters)
Restore colors to test output

Lerna run test executes the npm test script of each package in a
subprocess, causing certain libraries like chalk to disable color
output since stdout is not a TTY.

Let's override this behavior, enabling color output for tests.

@ang-zeyu ang-zeyu added this to the v2.15.3 milestone Sep 5, 2020
@ang-zeyu ang-zeyu force-pushed the restore-test-colors branch from 86b0aeb to adf517a Compare September 5, 2020 03:51
Lerna run test executes the npm test script of each package in a
subprocess, causing certain libraries like chalk to disable color
output since stdout is not a TTY.

Let's override this behavior, enabling color output for tests.
@ang-zeyu ang-zeyu force-pushed the restore-test-colors branch from 63777d3 to 0007d8b Compare September 5, 2020 04:07
@ang-zeyu ang-zeyu merged commit c5b0bcc into MarkBind:master Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant