fix(tests): Improve MessageChannel mocking to prevent worker force exits (#34878)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Joe Li
2025-08-28 09:31:50 -07:00
committed by GitHub
parent 665a11f821
commit 7946ec003f

View File

@@ -36,7 +36,7 @@ export default class FixJSDOMEnvironment extends JSDOMEnvironment {
// Forces rc-overflow to use requestAnimationFrame fallback instead
// Can be removed when rc-overflow properly cleans up MessagePorts in test environments
// See: https://github.com/apache/superset/pull/34871
delete (this.global as any).MessageChannel;
delete (this.global as any).MessagePort;
this.global.MessageChannel = undefined as any;
this.global.MessagePort = undefined as any;
}
}