michael-s-molina commented on code in PR #20675:
URL: https://github.com/apache/superset/pull/20675#discussion_r919985126


##########
superset-frontend/src/addSlice/AddSliceContainer.test.tsx:
##########
@@ -62,13 +61,20 @@ const mockUserWithDatasetWrite: UserWithPermissionsAndRoles 
= {
   isAnonymous: false,
 };
 
+// We don't need the actual implementation for the tests
+const routeProps = {
+  history: {} as any,
+  location: {} as any,
+  match: {} as any,
+};
+
 async function getWrapper(user = mockUser) {
   const wrapper = mount(
-    <AddSliceContainer user={user} addSuccessToast={() => null} />,
-    {
-      wrappingComponent: ThemeProvider,
-      wrappingComponentProps: { theme: supersetTheme },
-    },
+    <AddSliceContainer
+      user={user}
+      addSuccessToast={() => null}
+      {...routeProps}

Review Comment:
   It won't satisfy Typescript 😞. We should probably change the tests to RTL in 
the future where we could use the helper that allows composition. 



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