Merge pull request #2520 from GSA/bug-set-UAT-timezone-in-test

bug - Update activityChart.test.js
This commit is contained in:
ccostino
2025-04-18 07:51:23 -04:00
committed by GitHub

View File

@@ -18,6 +18,12 @@ Object.defineProperty(HTMLElement.prototype, 'clientWidth', {
});
// beforeAll hook to set up the DOM and load D3.js script
beforeAll(() => {
jest.spyOn(Intl, 'DateTimeFormat').mockImplementation(() => ({
resolvedOptions: () => ({ timeZone: 'UTC' })
}));
});
beforeAll(done => {
// Set up the DOM with the D3 script included
document.body.innerHTML = `