Jest suppresses the console log message by default. In order to show the console log message, set silent option to false at the command line
set --silent=false
in the command line:
npm run test -- --silent=false
More Related Contents:
- How do I deal with localStorage in jest tests?
- Mocking `document` in jest
- How do I run a single test using Jest?
- Jest gives an error: “SyntaxError: Unexpected token export”
- Loose match one value in jest.toHaveBeenCalledWith
- How to run Jest tests sequentially?
- Google Chrome console.log() inconsistency with objects and arrays
- How to mock functions in the same module using Jest?
- Why is console.log() considered better than alert()?
- Does Jest support ES6 import/export?
- Jest mock inner function
- Does console.log invokes toString method of an object?
- Configure Node.js to log to a file instead of the console
- Node.js: printing to console without a trailing newline?
- Mocking globals in Jest
- Spying on an imported function that calls another function in Jest
- Can you write async tests that expect toThrow?
- Recommended approach for route-based tests within routes of react-router
- jest unexpected token when importing css
- Node v13 / Jest / ES6 — native support for modules without babel or esm
- What functions should I mock during unit testing
- Jest: how to mock console when it is used by a third-party-library?
- Dumping whole array: console.log and console.dir output “… NUM more items]”
- SyntaxError with Jest and React and importing CSS files
- Jest won’t transform the module – SyntaxError: Cannot use import statement outside a module
- Mock inner axios.create()
- Mocking dayjs extend
- How to mock React component methods with jest and enzyme
- Jest matcher to match any one of three values
- Show original order of object properties in console.log