Closed
Description
Can you reproduce the problem with latest npm?
Yes, I'm already on [email protected]
.
Description
Create a new app:
create-react-app test-app
cd test-app
Add the following tests to src/App.test.js
:
it('should log when test passes', () => {
console.log('test');
console.warn('test');
console.error('test');
expect(0).toEqual(0);
});
it('should log when test fails', () => {
console.log('test');
console.warn('test');
console.error('test');
expect(0).toEqual(1);
});
Run the tests with either yarn
or npm
.
Expected behavior
I would expect any of these console
statements to print to stdout somewhere in the test output.
Actual behavior
The test output shows two passing tests and one failing test, as expected, along with the usual general test info and commands. But the logged output is nowhere to be found.
Environment
-
npm ls react-scripts
(if you haven’t ejected): 0.8.5 -
node -v
: v7.4.0 -
npm -v
: 4.0.5 -
Operating system: OSX 10.11.6
-
Browser and version: n/a
Reproducible Demo
See description