build(dev-deps): upgrade Jest to major version v30 (#33979)

This commit is contained in:
Đỗ Trọng Hải
2025-07-03 11:01:40 +07:00
committed by GitHub
parent c008190a08
commit 42288c4784
46 changed files with 4535 additions and 1162 deletions

View File

@@ -29,6 +29,7 @@ import {
} from 'spec/helpers/testing-library';
import ShareSqlLabQuery from 'src/SqlLab/components/ShareSqlLabQuery';
import { initialState } from 'src/SqlLab/fixtures';
import { omit } from 'lodash';
const mockStore = configureStore([thunk]);
const defaultProps = {
@@ -110,7 +111,7 @@ describe('ShareSqlLabQuery', () => {
});
});
const button = screen.getByRole('button');
const { id: _id, remoteId: _remoteId, ...expected } = mockQueryEditor;
const expected = omit(mockQueryEditor, ['id', 'remoteId']);
userEvent.click(button);
await waitFor(() =>
expect(fetchMock.calls(storeQueryUrl)).toHaveLength(1),
@@ -134,7 +135,7 @@ describe('ShareSqlLabQuery', () => {
});
});
const button = screen.getByRole('button');
const { id: _id, ...expected } = unsavedQueryEditor;
const expected = omit(unsavedQueryEditor, ['id']);
userEvent.click(button);
await waitFor(() =>
expect(fetchMock.calls(storeQueryUrl)).toHaveLength(1),