![How to test console output (console.log, console.warn) with RTL (React-Testing-Library) and Jest | by Ilya Zykin | Medium How to test console output (console.log, console.warn) with RTL (React-Testing-Library) and Jest | by Ilya Zykin | Medium](https://miro.medium.com/v2/resize:fit:2000/1*-MvgWMaeWVeme-ZKEw-UkA.png)
How to test console output (console.log, console.warn) with RTL (React-Testing-Library) and Jest | by Ilya Zykin | Medium
![Spy on console.error doesn't work · Issue #555 · testing-library/react-hooks-testing-library · GitHub Spy on console.error doesn't work · Issue #555 · testing-library/react-hooks-testing-library · GitHub](https://user-images.githubusercontent.com/6171841/105728168-204c4080-5f2c-11eb-9e57-d77eb216740b.png)
Spy on console.error doesn't work · Issue #555 · testing-library/react-hooks-testing-library · GitHub
![TypeError when attempting to call default export function '_sampleFunction' using Jest mocking technique - Javascript TypeError when attempting to call default export function '_sampleFunction' using Jest mocking technique - Javascript](https://i.stack.imgur.com/vJOjq.png)
TypeError when attempting to call default export function '_sampleFunction' using Jest mocking technique - Javascript
![Cory House on X: "Ever write a test that expects an error to occur? TIL a trick to suppress logging the error to the console: Set console.error to a mock function. console.error = Cory House on X: "Ever write a test that expects an error to occur? TIL a trick to suppress logging the error to the console: Set console.error to a mock function. console.error =](https://pbs.twimg.com/media/EYFAOpbXQAAz4oW.jpg:large)