sadpandajoe commented on code in PR #36771:
URL: https://github.com/apache/superset/pull/36771#discussion_r2662946504


##########
superset-frontend/src/components/StreamingExportModal/useStreamingExport.test.ts:
##########
@@ -16,10 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { TextEncoder, TextDecoder } from 'util';
 import { renderHook, act } from '@testing-library/react-hooks';
+import { waitFor } from '@testing-library/react';
 import { useStreamingExport } from './useStreamingExport';
 import { ExportStatus } from './StreamingExportModal';
 
+// Polyfill TextEncoder/TextDecoder for Jest environment
+global.TextEncoder = TextEncoder;
+global.TextDecoder = TextDecoder as typeof global.TextDecoder;

Review Comment:
   The same pattern exists in shim.tsx and other test files. Moving to 
`beforeAll()` would be inconsistent with the rest of the codebase.



-- 
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