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 2020/06/24 16:16:54 UTC

[GitHub] [incubator-superset] rusackas commented on a change in pull request #10148: fix: refine shouldUseLegacyApi and add tests

rusackas commented on a change in pull request #10148:
URL: https://github.com/apache/incubator-superset/pull/10148#discussion_r445013367



##########
File path: superset-frontend/spec/javascripts/explore/utils_spec.jsx
##########
@@ -202,4 +204,45 @@ describe('exploreUtils', () => {
       expect(v1RequestPayload).hasOwnProperty('queries');
     });
   });
+
+  describe('shouldUseLegacyApi', () => {
+    beforeAll(() => {
+      getChartMetadataRegistry()
+        .registerValue('my_legacy_viz', { useLegacyApi: true })
+        .registerValue('my_v1_viz', { useLegacyApi: false });
+    });
+
+    afterAll(() => {
+      getChartMetadataRegistry().remove('my_legacy_viz').remove('my_v1_viz');
+    });
+
+    it('return true for legacy viz', () => {

Review comment:
       NIT, but maybe "returns" for these so it('reads like a sentence')




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

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