rusackas commented on code in PR #39459:
URL: https://github.com/apache/superset/pull/39459#discussion_r3364260456


##########
superset-frontend/src/components/Chart/ChartRenderer.test.tsx:
##########
@@ -394,7 +394,9 @@ test('renders chart during loading when 
suppressLoadingSpinner has valid data',
     queriesResponse: [{ data: [{ value: 1 }] }],
   };
 
-  const { getByTestId } = render(<ChartRenderer {...props} />);
+  const { getByTestId } = render(
+    <ChartRenderer {...(props as ChartRendererProps)} />,
+  );

Review Comment:
   Done in 9268647bca — typed the `requiredProps` fixture (and the derived 
`initialProps`/`updatedProps` objects) as the full `ChartRendererProps` and 
dropped the per-call-site `as ChartRendererProps` casts, so TypeScript now 
validates the test setup directly. `tsc --noEmit` passes.



##########
superset-frontend/src/components/Chart/ChartRenderer.test.tsx:
##########
@@ -394,7 +394,9 @@ test('renders chart during loading when 
suppressLoadingSpinner has valid data',
     queriesResponse: [{ data: [{ value: 1 }] }],
   };
 
-  const { getByTestId } = render(<ChartRenderer {...props} />);
+  const { getByTestId } = render(
+    <ChartRenderer {...(props as ChartRendererProps)} />,
+  );

Review Comment:
   Done in 9268647bca — typed the requiredProps fixture (and the derived 
initialProps/updatedProps objects) as the full ChartRendererProps and dropped 
the per-call-site `as ChartRendererProps` casts, so TypeScript now validates 
the test setup directly. tsc --noEmit passes.



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