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

Failed test diffs are not coloured when multiple test suites are run in parallel on Node 6 #5817

Closed
gsteacy opened this issue Mar 17, 2018 · 6 comments
Labels

Comments

@gsteacy
Copy link

gsteacy commented Mar 17, 2018

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Repro here: https://github.com/gsteacy/jest-bug-repro. Running npm test -- --no-cache is sufficient.

When Jest is running multiple test suites in parallel it does not show colours in the diffs for failed tests. Running the test again with npm test -- --no-cache -i so that they run serially will show the colours. Also, running the same tests on Node 8 works as expected.

no-colour

What is the expected behavior?

Diff is coloured

with-colour

Please provide your exact Jest configuration

Defaults

Run npx envinfo --preset jest in your project directory and paste the
results here

  System:
    OS: Windows 8.1
    CPU: x64 Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
  Binaries:
    Node: 6.13.1
    Yarn: 1.3.2
    npm: 3.10.10
  npmPackages:
    jest:
      wanted: ^22.4.2
      installed: 22.4.2
@maumont
Copy link

maumont commented Mar 23, 2018

I'm facing the same problem running under these conditions:

  System:
    OS: macOS High Sierra 10.13.2
    CPU: 2,3 GHz Intel Core i5
  Binaries:
    Node: 8.9.4
    Yarn: 1.3.2
    npm: 5.6.0
  npmPackages:
    jest:
      wanted: ^22.4.2
      installed: 22.4.2

The highlighted errors were working when I was using jest 22.1.4

@gsteacy
Copy link
Author

gsteacy commented Mar 23, 2018

The highlighted errors were working when I was using jest 22.1.4

Not for me. It fails right back to 22.0.0. 21.2.1 shows the colours as expected. 22.0.0 is the first release with the source code context shown in the diff so that might be related (see #5087). Actually looking at the release notes there were quite a few changes to jest-message-util and jest-diff in that release.

@gsteacy
Copy link
Author

gsteacy commented Mar 23, 2018

Rather than speculating further I did a git bisect and it seems the offending commit is eb70265

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants