EnxDev commented on code in PR #42112:
URL: https://github.com/apache/superset/pull/42112#discussion_r4163619227


##########
superset-frontend/packages/superset-ui-core/src/components/MetadataBar/MetadataBar.test.tsx:
##########
@@ -41,18 +40,32 @@ const TAGS = ['management', 'research', 'poc'];
 const A_WEEK_AGO = 'a week ago';
 const TWO_DAYS_AGO = '2 days ago';
 
+// react-resize-detector's ESM export is non-configurable, so jest.spyOn can't
+// replace it; swap the implementation through the module mock instead.
+let mockResizeImpl: ((props: any) => unknown) | null = null;

Review Comment:
   Nit, take it or leave it. The three `props: any` here are new `any`s, and 
`Parameters<typeof useResizeDetector>[0]` gives you the real shape for free.
   
   It would also have caught the `onResize` payload change at compile time 
rather than at runtime.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to