--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2024 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import failOnConsole from 'jest-fail-on-console';
+const IGNORED_ERROR_MESSAGES: string[] = [];
+
+failOnConsole({
+ silenceMessage: (message) => {
+ return IGNORED_ERROR_MESSAGES.some((ignore_message) => message.includes(ignore_message));
+ },
+});
'<rootDir>/config/jest/SetupTestEnvironment.js',
'<rootDir>/config/jest/SetupTheme.js',
],
- setupFilesAfterEnv: ['<rootDir>/config/jest/SetupReactTestingLibrary.ts'],
+ setupFilesAfterEnv: [
+ '<rootDir>/config/jest/SetupReactTestingLibrary.ts',
+ '<rootDir>/../config/jest/SetupFailOnConsole.ts',
+ ],
snapshotSerializers: ['@emotion/jest/serializer'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: [
setupFilesAfterEnv: [
'<rootDir>/config/jest/SetupReactTestingLibrary.ts',
'<rootDir>/config/jest/SetupJestAxe.ts',
+ '<rootDir>/config/jest/SetupFailOnConsole.ts',
],
snapshotSerializers: ['@emotion/jest/serializer'],
testEnvironment: 'jsdom',
"jest": "29.7.0",
"jest-axe": "8.0.0",
"jest-environment-jsdom": "29.7.0",
+ "jest-fail-on-console": "3.1.2",
"jest-junit": "16.0.0",
"jest-slow-test-reporter": "1.0.0",
"jsdom": "24.0.0",
jest: "npm:29.7.0"
jest-axe: "npm:8.0.0"
jest-environment-jsdom: "npm:29.7.0"
+ jest-fail-on-console: "npm:3.1.2"
jest-junit: "npm:16.0.0"
jest-slow-test-reporter: "npm:1.0.0"
jsdom: "npm:24.0.0"
languageName: node
linkType: hard
+"jest-fail-on-console@npm:3.1.2":
+ version: 3.1.2
+ resolution: "jest-fail-on-console@npm:3.1.2"
+ checksum: 10/6f47a36cd9481121302660dbf29a6ce2443d0c2ad6ad872ee509fc538d674cdaa217f9bd041ce3771c1d8fda081ddcd85221027bbe6c9d2681cdae9d0922d329
+ languageName: node
+ linkType: hard
+
"jest-get-type@npm:^27.4.0":
version: 27.4.0
resolution: "jest-get-type@npm:27.4.0"