You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/11 23:32:12 UTC

[GitHub] [superset] eschutho commented on a diff in pull request #21776: fix(CustomFrame): Resolves issue #21731 where date range in explore throws runtime error

eschutho commented on code in PR #21776:
URL: https://github.com/apache/superset/pull/21776#discussion_r992856452


##########
superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.test.tsx:
##########
@@ -39,6 +39,14 @@ const store = mockStore({
   common: { locale: 'en' },
 });
 
+// case when common.locale is not populated
+const mockEmptyStore = configureStore([thunk]);
+const emptyStore = mockEmptyStore({});
+
+// case when common.locale is populated with invalid locale
+const mockInvalidStore = configureStore([thunk]);
+const invalidStore = mockInvalidStore({ common: { locale: 'invalid_locale' } });

Review Comment:
   I'm not familiar with the return object of configureStore but can you create two separate distinct stores with the same return of `configureStore`? In other words, can we create empty and invalid both from the `mockEmptyStore`?



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org