rusackas commented on code in PR #44154: URL: https://github.com/apache/superset/pull/44154#discussion_r4165117251
########## superset-frontend/src/utils/downloadAsImage.test.ts: ########## @@ -69,13 +52,10 @@ const mockToJpeg = domToImage.toJpeg as jest.Mock; const mockToPng = domToImage.toPng as jest.Mock; const mockHtml2Canvas = html2canvas as jest.Mock; const mockIsSafari = isSafari as jest.Mock; -const mockAddWarningToast = addWarningToast as jest.Mock; +// Passed explicitly to downloadAsImageOptimized below, mirroring how a real +// caller supplies an already-bound `useToasts()` callback. +const mockAddWarningToast = jest.fn(); Review Comment: Good catch, the Safari rejection test now passes `mockAddWarningToast` as the 7th argument, pushed in 18a76cfab. -- 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]
