From e19eef766e0ec3e15e8371b8475bbdeb83f3e73a Mon Sep 17 00:00:00 2001 From: Carrie Arnold Date: Thu, 29 Jun 2023 15:04:50 -0500 Subject: [PATCH] just messing around with configuration a bit, was able to suppress all console logging but want to verify this is desired --- client/jest.config.js | 2 +- client/jest.setup.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/jest.config.js b/client/jest.config.js index 1c7874006..c47b9de4f 100644 --- a/client/jest.config.js +++ b/client/jest.config.js @@ -186,7 +186,7 @@ module.exports = { // unmockedModulePathPatterns: undefined, // Indicates whether each individual test should be reported during the run - // verbose: undefined, + verbose: true, // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode // watchPathIgnorePatterns: [], diff --git a/client/jest.setup.js b/client/jest.setup.js index 119a80e33..5b11a2dda 100644 --- a/client/jest.setup.js +++ b/client/jest.setup.js @@ -1 +1,12 @@ jest.mock('@niivue/niivue', () => {}); + +global.console = { + ...console, + // uncomment to ignore a specific log level + log: jest.fn(), + debug: jest.fn(), + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), +}; +