Skip to content

Commit

Permalink
add mock
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Feb 4, 2024
1 parent 838f596 commit e636500
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/BulkEditList/BulkEditList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { CAPABILITIES, IDENTIFIERS, CRITERIA } from '../../constants';

import { BulkEditList } from './BulkEditList';


jest.mock('../BulkEditLogs/BulkEditLogs', () => {
return jest.fn().mockReturnValue('BulkEditLogs');
});
Expand All @@ -34,6 +35,17 @@ jest.mock('./BulkEditListResult/BulkEditInAppPreviewModal/BulkEditInAppPreviewMo
return jest.fn().mockReturnValue('BulkEditInAppPreviewModal');
});

jest.mock('../../hooks/api', () => ({
...jest.requireActual('../../hooks/api'),
useQueryPlugin: jest.fn().mockReturnValue({
entityTypeDataSource: jest.fn(),
queryDetailsDataSource: jest.fn(),
testQueryDataSource: jest.fn(),
getParamsSource: jest.fn(),
cancelQueryDataSource: jest.fn(),
}),
}));

const renderBulkEditList = ({ criteria }) => {
const params = new URLSearchParams({
criteria,
Expand Down

0 comments on commit e636500

Please sign in to comment.