Copilot commented on code in PR #39508:
URL: https://github.com/apache/superset/pull/39508#discussion_r3277994877


##########
superset-frontend/spec/helpers/testing-library.tsx:
##########
@@ -97,7 +97,7 @@ export function createWrapper(options?: Options) {
     }
 
     if (useDnd) {
-      // @ts-expect-error react-dnd types not updated for React 18
+      // @ts-ignore react-dnd's DndProviderProps omits `children` under React 
18 types

Review Comment:
   Using `// @ts-ignore` here permanently suppresses type checking even if 
react-dnd typings are fixed later. Prefer removing the directive if it’s no 
longer needed, or use `// @ts-expect-error` (with a brief reason) or a small 
type-safe wrapper/cast so CI will alert when the underlying typing issue is 
resolved.
   



##########
superset-frontend/src/pages/FileHandler/index.test.tsx:
##########
@@ -165,9 +168,16 @@ beforeEach(() => {
     .launchQueue;
 });
 
-afterEach(() => {
+afterEach(async () => {
   pendingTimerIds.forEach(id => clearTimeout(id));
   pendingTimerIds.clear();
+  if (consumerPromise) {
+    await consumerPromise.catch(e => {
+      // eslint-disable-next-line no-console
+      console.warn('LaunchQueue consumer rejected:', e);
+    });
+    consumerPromise = null;

Review Comment:
   `consumerPromise` rejections are caught and only logged, which still 
swallows the failure and can let tests pass even when the LaunchQueue consumer 
errored. Consider letting the rejection fail the test (e.g., rethrow after 
logging, or avoid catching here and rely on Jest to surface the failure).
   



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