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

Jest swallows console output with --bail #3755

Closed
taion opened this issue Jun 7, 2017 · 5 comments · Fixed by #3882 or #3895
Closed

Jest swallows console output with --bail #3755

taion opened this issue Jun 7, 2017 · 5 comments · Fixed by #3882 or #3895
Labels

Comments

@taion
Copy link
Contributor

taion commented Jun 7, 2017

Jest v20.0.4
Node v8.0.0

$ cat test.js
test('foo', () => {
  console.log('this is the expected log statement');
  expect().toBeDefined();
});
$ jest test.js
 FAIL  ./test.js
  ● foo

    expect(received).toBeDefined()

    Expected value to be defined, instead received
      undefined

      at Object.<anonymous>.test (test.js:3:12)
          at Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:169:7)

  ✕ foo (5ms)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        0.808s, estimated 1s
Ran all test suites matching "test.js".
  console.log test.js:2
    this is the expected log statement

$ jest -b test.js
 FAIL  ./test.js
  ● foo

    expect(received).toBeDefined()

    Expected value to be defined, instead received
      undefined

      at Object.<anonymous>.test (test.js:3:12)
          at Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:169:7)

  ✕ foo (5ms)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        0.55s, estimated 1s
Ran all test suites matching "test.js".
$
@taion
Copy link
Contributor Author

taion commented Jun 7, 2017

As requested per #2441 (comment)

@thymikee
Copy link
Collaborator

I can confirm this is happening. @cpojer should we consider this a bug?

@cpojer
Copy link
Member

cpojer commented Jun 11, 2017

yes

@rogeliog
Copy link
Contributor

Is it related to #3853?

@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 May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants