diff --git a/jest.config.base.js b/jest.config.base.js index 0679bb37d4..9d9a9c3278 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -28,4 +28,5 @@ module.exports = { testEnvironmentOptions: { url: 'http://localhost', }, + setupFilesAfterEnv: ['/../../setup-jest.js'], }; diff --git a/setup-jest.js b/setup-jest.js new file mode 100644 index 0000000000..bd5ba9818e --- /dev/null +++ b/setup-jest.js @@ -0,0 +1,9 @@ +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(), +};