-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
💥 Regression Report
Running jest with a local build of jest using yarn link on a project that uses winston for logging and setting verbose: false causes jest to fail with
TypeError: message.split is not a function
at buffer.reduce (../jest/packages/jest-util/build/getConsoleOutput.js:54:8)
at Array.reduce (<anonymous>)Setting verbose: false configures jest to use BufferedConsole.
I've locally built jest on master and added in a console.log call in runTest in the jest-runner package to log which Console is being used. Ideally we could have an integration test for this but I don't know how to write an integration test with a dependency in it.
Last working version
Worked up to version: 24.1.0
Stopped working in version: master
To Reproduce
Steps to reproduce the behavior:
Setup any projects using winston and use the local version of jest and set verbose: false in the jest config
Expected behavior
Here's a screenshot with jest at 24.1
And here's running the same test suite with jest at master. Note that I built it with a console log to verify which Console is being used.
Link to repl or repo (highly encouraged)
Here's a repo that I've made. I've left instructions and what I think is happening.
https://github.com/natealcedo/buffered-console-repro
Issues without a reproduction link are likely to stall.
Run npx envinfo --preset jest
Paste the results here:
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Binaries:
Node: 8.15.0 - ~/.nvm/versions/node/v8.15.0/bin/node
Yarn: 1.13.0 - ~/.nvm/versions/node/v8.15.0/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.15.0/bin/npm
npmPackages:
jest: ^24.1.0 => 24.1.0

