rusackas commented on code in PR #32207:
URL: https://github.com/apache/superset/pull/32207#discussion_r1951265495
##########
superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx:
##########
@@ -35,25 +30,11 @@ import {
SlowChartPlugin,
} from './MockChartPlugins';
-const Wrapper = ({
- theme,
- children,
-}: {
- theme: SupersetTheme;
- children: ReactNode;
-}) => <ThemeProvider theme={theme}>{children}</ThemeProvider>;
-
-const styledMount = (component: ReactElement) =>
- mount(component, {
- wrappingComponent: Wrapper,
- wrappingComponentProps: {
- theme: supersetTheme,
- },
- });
+const renderWithTheme = (component: ReactElement) =>
+ render(<ThemeProvider theme={supersetTheme}>{component}</ThemeProvider>);
Review Comment:
Ahh, this one doesn't use `/spec/helpers/testing-library` because it's in
the `packages` part of the monorepo, so there's no access to it.
We should probably eventually move the helpers to `superset-ui/core` or a
new testing package.
--
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]