Skip to content

Commit

Permalink
(refactor) Set global testTimeout in Jest config (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jan 12, 2024
1 parent 8cb86eb commit 9bb9dfe
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ module.exports = {
testEnvironmentOptions: {
url: 'http://localhost/',
},
testTimeout: 25000,
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import AppointmentTabs from './appointment-tabs.component';

const mockOpenmrsFetch = openmrsFetch as jest.Mock;

jest.setTimeout(10000);

describe('AppointmentTabs', () => {
xit(`renders tabs showing different appointment lists`, async () => {
const user = userEvent.setup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { saveEncounter, savePatient } from './patient-registration.resource';
import { mockedAddressTemplate } from '__mocks__';
import { mockPatient } from 'tools';

jest.setTimeout(10000);

const mockedUseConfig = useConfig as jest.Mock;
const mockedUsePatient = usePatient as jest.Mock;
const mockedSaveEncounter = saveEncounter as jest.Mock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jest.mock('../helpers/helpers', () => {
};
});

jest.setTimeout(20000);

describe('ActiveVisitsTable: ', () => {
beforeEach(() => {
mockUseSession.mockReturnValue(mockSession),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jest.mock('@openmrs/esm-framework', () => {
};
});

jest.setTimeout(20000);

describe('Queue entry details', () => {
beforeEach(() =>
mockedUseConfig.mockReturnValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ jest.mock('@openmrs/esm-framework', () => {
};
});

jest.setTimeout(20000);

describe('QueuePatientBaseTable: ', () => {
it('renders a tabular overview of appointments data when available', async () => {
const user = userEvent.setup();
Expand Down

0 comments on commit 9bb9dfe

Please sign in to comment.