Skip to content

Commit

Permalink
(fix) fix broken unit test on billing dashboard (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldkibet authored Jul 4, 2024
1 parent f182434 commit a1b06fe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@ window.openmrsBase = '/openmrs';
window.spaBase = '/spa';
window.getOpenmrsSpaBase = () => '/openmrs/spa/';
window.HTMLElement.prototype.scrollIntoView = jest.fn();

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: (query) => ({
matches: false,
media: query,
onchange: null,
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
}),
});

0 comments on commit a1b06fe

Please sign in to comment.