-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, there are many logs regarding warnings from tests. The changes in this commit are: * Clean some of the logs * Introduce `jest-canvas-mock` dependency to properly mock `@patternfly/react-topology` `SVG` interaction * Remove the duplicated build of `@kaoto-next/camel-catalog` package
- Loading branch information
Showing
9 changed files
with
56 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
import '@testing-library/jest-dom'; | ||
import { FilterDOMPropsKeys, filterDOMProps } from 'uniforms'; | ||
// import '@testing-library/jest-dom/extend-expect' | ||
|
||
beforeAll(() => { | ||
jest | ||
.spyOn(global, 'crypto', 'get') | ||
.mockImplementation(() => ({ getRandomValues: () => [12345678] }) as unknown as Crypto); | ||
filterDOMProps.register('inputRef' as FilterDOMPropsKeys, 'placeholder' as FilterDOMPropsKeys); | ||
|
||
jest | ||
.spyOn(global, 'crypto', 'get') | ||
.mockImplementation(() => ({ getRandomValues: () => [12345678] }) as unknown as Crypto); | ||
|
||
jest.spyOn(console, 'warn').mockImplementation((...args) => { | ||
if ( | ||
args[0].toString().includes('[mobx-react-lite] importing batchingForReactDom is no longer needed') || | ||
args[0].toString().includes('NODE_ENV is not defined') | ||
) { | ||
return; | ||
} | ||
|
||
console.log(...args); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters