File tree Expand file tree Collapse file tree
packages/pluggableWidgets/color-picker-web Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const base = require ( "@mendix/pluggable-widgets-tools/test-config/jest.config.js" ) ;
2+
3+ module . exports = {
4+ ...base ,
5+ setupFilesAfterEnv : [ ...base . setupFilesAfterEnv , "<rootDir>/jest.setup.ts" ]
6+ } ;
Original file line number Diff line number Diff line change 3838 "publish-marketplace" : " rui-publish-marketplace" ,
3939 "release" : " cross-env MPKOUTPUT=ColorPicker.mpk pluggable-widgets-tools release:web" ,
4040 "start" : " cross-env MPKOUTPUT=ColorPicker.mpk pluggable-widgets-tools start:server" ,
41- "test" : " pluggable-widgets-tools test:unit:web " ,
41+ "test" : " jest " ,
4242 "update-changelog" : " rui-update-changelog-widget" ,
4343 "verify" : " rui-verify-package-format"
4444 },
Original file line number Diff line number Diff line change 1+ import "@testing-library/jest-dom" ;
2+
3+ const originalConsoleError = console . error . bind ( console ) ;
4+ console . error = ( ...args : unknown [ ] ) : void => {
5+ // react-color@2.19.3 uses defaultProps on function components, deprecated in React 18.3.
6+ // These warnings are from the library, not our widget code.
7+ if ( typeof args [ 0 ] === "string" && args [ 0 ] . includes ( "Support for defaultProps will be removed" ) ) {
8+ return ;
9+ }
10+ originalConsoleError ( ...args ) ;
11+ } ;
You can’t perform that action at this time.
0 commit comments