msyavuz commented on code in PR #35993:
URL: https://github.com/apache/superset/pull/35993#discussion_r2495906893


##########
superset-frontend/src/explore/components/controls/DatasourceControl/DatasourceControl.test.tsx:
##########
@@ -26,15 +26,26 @@ import {
   act,
   userEvent,
   waitFor,
+  cleanup,
 } from 'spec/helpers/testing-library';
 import { fallbackExploreInitialData } from 'src/explore/fixtures';
+import type { DatasetObject } from 'src/features/datasets/types';
 import DatasourceControl from '.';
 
 const SupersetClientGet = jest.spyOn(SupersetClient, 'get');
 
+let originalLocation: Location;
+
+beforeEach(() => {
+  originalLocation = window.location;
+});
+
 afterEach(() => {
+  window.location = originalLocation;
+  cleanup();

Review Comment:
   @sadpandajoe bot is again probably correct on this one.
   
https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#using-cleanup



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