Skip to content

Commit

Permalink
Silence console output in jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Dec 16, 2024
1 parent 33900fc commit 0116d90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions setupTestGlobals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ global.crypto = {
return nodeCrypto.randomFillSync(buffer);
},
};

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

0 comments on commit 0116d90

Please sign in to comment.