Skip to content

Commit

Permalink
Remove findDOMNode and defaultProps from suppressed warnings (#47619)
Browse files Browse the repository at this point in the history
* Remove findDOMNode and defaultProps from suppressed warnings

* Remove old tests from console output ignore list
  • Loading branch information
ravicious authored Oct 16, 2024
1 parent 8188f12 commit 6474bb3
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions web/packages/build/jest/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,16 @@ const rootDir = path.join(__dirname, '..', '..', '..', '..');
// If the test is expected to use either of those console functions, follow the advice from the
// error message.
const failOnConsoleIgnoreList = new Set([
...entFailOnConsoleIgnoreList,
'web/packages/design/src/utils/match/matchers.test.ts',
'web/packages/shared/components/TextEditor/TextEditor.test.tsx',
'web/packages/teleport/src/components/BannerList/useAlerts.test.tsx',
'web/packages/teleport/src/Navigation/NavigationItem.test.tsx',
// As of the parent commit (708dac8e0d0), the tests below are flakes.
// https://github.com/gravitational/teleport/pull/41252#discussion_r1595036569
'web/packages/teleport/src/Console/DocumentNodes/DocumentNodes.story.test.tsx',
'web/packages/teleport/src/Recordings/Recordings.story.test.tsx',
'web/packages/teleport/src/Audit/Audit.story.test.tsx',
'web/packages/teleport/src/Discover/Database/DeployService/AutoDeploy/AutoDeploy.test.tsx',
...entFailOnConsoleIgnoreList,
]);

// A list of allowed messages, for expected messages that shouldn't fail the build (e.g., warnings
// about deprecated functions from 3rd-party libraries).
const failOnConsoleAllowedMessages = [
'defaultProps will be removed',
'findDOMNode is deprecated',
];
const failOnConsoleAllowedMessages = [];

failOnConsole({
skipTest: ({ testPath }) => {
const relativeTestPath = path.relative(rootDir, testPath);
Expand Down

0 comments on commit 6474bb3

Please sign in to comment.