Fixed unit test

This commit is contained in:
alexjanousekGSA
2025-02-03 12:02:24 -05:00
parent 1e195f5813
commit f294370f88

View File

@@ -199,7 +199,9 @@ test('Fetches data and creates chart and table correctly', async () => {
const data = await fetchData('service');
expect(global.fetch).toHaveBeenCalledWith(`/services/${currentServiceId}/daily-stats.json`);
expect(global.fetch).toHaveBeenCalledWith(
`/services/${currentServiceId}/daily-stats.json?timezone=UTC`
);
expect(data).toEqual(mockResponse);
const labels = Object.keys(mockResponse).map(dateString => {