Skip to content

Commit c8e02b6

Browse files
committed
Silence console output in jest tests
1 parent 38bc5af commit c8e02b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

setupTestGlobals.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ global.crypto = {
77
return nodeCrypto.randomFillSync(buffer);
88
},
99
};
10+
11+
global.console = {
12+
...console,
13+
log: jest.fn(),
14+
debug: jest.fn(),
15+
info: jest.fn(),
16+
warn: jest.fn(),
17+
error: jest.fn(),
18+
};

0 commit comments

Comments
 (0)