From f3aca43e43a88fbd080e30219f0a4ca9fa7d4b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Mon, 16 Dec 2024 10:25:26 +0100 Subject: [PATCH] Silence console output in jest tests --- setupTestGlobals.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setupTestGlobals.ts b/setupTestGlobals.ts index 0784784e7..0551dab10 100644 --- a/setupTestGlobals.ts +++ b/setupTestGlobals.ts @@ -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(), +};