diff --git a/public/pages/QueryDetails/QueryDetails.test.tsx b/public/pages/QueryDetails/QueryDetails.test.tsx index 196f267..921c99f 100644 --- a/public/pages/QueryDetails/QueryDetails.test.tsx +++ b/public/pages/QueryDetails/QueryDetails.test.tsx @@ -25,6 +25,15 @@ const mockQuery = MockQueries()[0]; const mockParams = { hashedQuery: hash(mockQuery) }; describe('QueryDetails component', () => { + beforeAll(() => { + jest.spyOn(Date.prototype, 'toLocaleTimeString').mockImplementation(() => '12:00:00 AM'); + jest.spyOn(Date.prototype, 'toDateString').mockImplementation(() => 'Mon Jan 13 2025'); + }); + + afterAll(() => { + jest.resetAllMocks(); // Reset all mocks after all tests + }); + beforeEach(() => { jest.clearAllMocks(); // Clear all mock calls and instances before each test }); diff --git a/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap b/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap index 912f011..fcd5254 100644 --- a/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap +++ b/public/pages/QueryDetails/__snapshots__/QueryDetails.test.tsx.snap @@ -44,7 +44,7 @@ exports[`QueryDetails component renders the QueryDetails page 1`] = `