diff --git a/package.json b/package.json index aaed5ab0dd..e297597ec3 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "http-proxy-middleware": "^2.0.3", "install": "^0.13.0", "jest-canvas-mock": "^2.4.0", - "jest-fail-on-console": "^3.0.1", "jest-worker": "^27.5.1", "js-sha3": "0.8.0", "lodash": "^4.17.21", @@ -88,6 +87,9 @@ "\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/ui/lib/fileMock.js", "\\.(css|less)$": "/ui/lib/fileMock.js" }, + "setupFilesAfterEnv": [ + "/setup-jest.ts" + ], "modulePathIgnorePatterns": [ "/dist/" ], @@ -118,6 +120,7 @@ "eslint": "^8.48.0", "eslint-plugin-import": "^2.25.4", "jest": "^27.3.1", + "jest-fail-on-console": "^3.3.1", "jest-styled-components": "^7.0.4", "jsdom": "^16.6.0", "parcel": "^2.13.3", diff --git a/setup-jest.ts b/setup-jest.ts new file mode 100644 index 0000000000..5584a0970f --- /dev/null +++ b/setup-jest.ts @@ -0,0 +1,3 @@ +import failOnConsole from 'jest-fail-on-console' + +failOnConsole() diff --git a/yarn.lock b/yarn.lock index d898063ad4..eeca161c77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5944,12 +5944,10 @@ jest-environment-node@^27.5.1: jest-mock "^27.5.1" jest-util "^27.5.1" -jest-fail-on-console@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/jest-fail-on-console/-/jest-fail-on-console-3.0.1.tgz" - integrity sha512-1811WQIY9lZN9wGkp7S6y69vw9+u6I21dmnRwXo6jSuF6Xv5OlN4msNCeKEVlc/C2H5N8dqLKuQlTAzQZ0mJlw== - dependencies: - chalk "^4.1.0" +jest-fail-on-console@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jest-fail-on-console/-/jest-fail-on-console-3.3.1.tgz#7d17e3a155cd0452b5be0d0906b6cb35e8594000" + integrity sha512-dmq/dmh5OBgJlD1MJdpznzwFQP8S7msf3ghTGWQLGhagWwHKzGtqXza76nuJUKOK7BdwqcTK6CCE49Xxv4ckUQ== jest-get-type@^27.5.1: version "27.5.1"