Skip to content

Commit

Permalink
Revert "do not mock console functions globaly but noopify them"
Browse files Browse the repository at this point in the history
This reverts commit 913b11e.
  • Loading branch information
HuiSF committed Mar 20, 2024
1 parent 4d2d245 commit 4c7e4af
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Suppress console messages printing during unit tests.
// Comment out log level as necessary (e.g. while debugging tests)
const noop = () => undefined;

global.console = {
...console,
log: noop,
debug: noop,
info: noop,
warn: noop,
error: noop,
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
};

// React Native global
Expand Down

0 comments on commit 4c7e4af

Please sign in to comment.