Skip to content

Commit

Permalink
[fix]: fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
sunjinkang committed Feb 26, 2024
1 parent 95531f0 commit be437fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/sqle/src/page/ReportStatistics/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ import { mockThemeStyleData } from '../../testUtils/mockHooks/mockThemeStyleData

import ReportStatistics from '.';
import { mockUseCurrentUser } from '@actiontech/shared/lib/testUtil/mockHook/mockUseCurrentUser';
import { ignoreAntdPlotsAttr } from '@actiontech/shared/lib/testUtil/common';
import statistic from '../../testUtils/mockApi/statistic';

jest.mock('react-router-dom', () => {
return {
...jest.requireActual('react-router-dom'),
useNavigate: jest.fn()
};
});

describe('sqle/ReportStatistics', () => {
ignoreAntdPlotsAttr();
beforeEach(() => {
statistic.mockAllApi();
jest.useFakeTimers();
mockThemeStyleData();
mockUseCurrentUser();
Expand Down

0 comments on commit be437fd

Please sign in to comment.