Categories
Development

Jest test passes locally but fails in azure devops

I have a react application using react-scripts 3.2.0 This is my test : jest.mock(‘./../shared/utils/getRequestWithDispatchUsing’, () => ({ __esModule: true, default: () => () => () => () => ‘getRequestWithDispatchUsing is success’, })); describe(‘getContractsUsing’, () => { const dispatch = jest.fn(action => action); const fetch = jest.fn(); const clientNumber = ‘clientNumber’; beforeEach(() => { jest.clearAllMocks(); }); […]