mirror of
https://github.com/apache/superset.git
synced 2026-06-01 13:49:21 +00:00
fix(tests): prevent jest hangs caused by MessageChannel-mocked React scheduler (#39957)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,7 @@ describe('QueryAutoRefresh', () => {
|
||||
const refreshApi = 'glob:*/api/v1/query/updated_since?*';
|
||||
|
||||
beforeEach(() => {
|
||||
jest.useFakeTimers();
|
||||
jest.useFakeTimers({ advanceTimers: true });
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -45,7 +45,7 @@ fetchMock.get('glob:*/api/v1/dataset/?*', {
|
||||
dataset_count: 3,
|
||||
});
|
||||
|
||||
jest.useFakeTimers();
|
||||
jest.useFakeTimers({ advanceTimers: true });
|
||||
|
||||
// Mock the user
|
||||
const useSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
||||
|
||||
Reference in New Issue
Block a user