geido commented on code in PR #27066:
URL: https://github.com/apache/superset/pull/27066#discussion_r1484612494


##########
superset-frontend/src/components/Chart/chartActions.test.js:
##########
@@ -114,6 +125,34 @@ describe('chart actions', () => {
       expect(fetchMock.calls(mockBigIntUrl)).toHaveLength(1);
       expect(json.value.toString()).toEqual(expectedBigNumber);
     });
+
+    it('handleChartDataRequestResponse should return result if 
GlobalAsyncQueries flag is disabled', async () => {
+      const result = await handleChartDataResponse(
+        { status: 200 },
+        { result: [1, 2, 3] },
+      );
+      expect(result).toEqual([1, 2, 3]);
+    });
+    it('handleChartDataRequestResponse should handle responses when 
GlobalAsyncQueries flag is enabled and results are returned synchronously', 
async () => {
+      global.featureFlags = {
+        [FeatureFlag.GlobalAsyncQueries]: true,
+      };
+      const result = await handleChartDataResponse(
+        { status: 200 },
+        { result: [1, 2, 3] },
+      );
+      expect(result).toEqual([1, 2, 3]);
+    });
+    it('handleChartDataRequestResponse should handle responses when 
GlobalAsyncQueries flag is enabled and query is running asynchronously', async 
() => {

Review Comment:
   ```suggestion
   
       it('handleChartDataRequestResponse should handle responses when 
GlobalAsyncQueries flag is enabled and query is running asynchronously', async 
() => {
   ```



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