From 86fb22e693319844f865351a39d18754dd44dc51 Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Tue, 13 Aug 2024 11:42:55 +0000 Subject: [PATCH] DSEGOG-341 Replace jest.clearAllMocks with vi.clearAllMocks and fix api unit tests --- src/api/__snapshots__/records.test.tsx.snap | 42 ++++++++-------- src/api/channels.test.tsx | 12 ++--- src/api/experiment.test.tsx | 2 +- src/api/export.test.tsx | 2 +- src/api/images.test.tsx | 10 ++-- src/api/records.test.tsx | 50 +++++++++++++------ src/api/sessions.test.tsx | 2 +- src/api/userPreferences.test.tsx | 2 +- src/api/waveforms.test.tsx | 2 +- src/channels/channelTree.component.test.tsx | 2 +- .../channelsDialogue.component.test.tsx | 2 +- .../filterDialogue.component.test.tsx | 2 +- .../falseColourPanel.component.test.tsx | 16 +++--- src/images/imageWindow.component.test.tsx | 2 +- src/mocks/handlers.ts | 4 +- .../chartTypeButtons.component.test.tsx | 2 +- .../moreOptionsBox.component.test.tsx | 2 +- .../moreOptionsToggle.component.test.tsx | 2 +- .../plotSettingsController.component.test.tsx | 2 +- .../plotSettings/xAxisTab.component.test.tsx | 2 +- .../plotSettings/yAxisTab.component.test.tsx | 2 +- src/plotting/plotWindow.component.test.tsx | 2 +- .../components/dataRefresh.component.test.tsx | 2 +- .../components/dateTime.component.test.tsx | 6 +-- .../components/experiment.component.test.tsx | 2 +- .../components/maxShots.component.test.tsx | 4 +- .../components/shotNumber.component.test.tsx | 2 +- .../components/timeframe.component.test.tsx | 2 +- src/search/searchBar.component.test.tsx | 2 +- .../deleteSessionDialogue.component.test.tsx | 2 +- .../sessionDialogue.component.test.tsx | 4 +- src/session/sessionDrawer.component.test.tsx | 2 +- .../sessionSaveButtons.component.test.tsx | 2 +- src/settingsMenuItems.component.test.tsx | 2 +- src/state/slices/plotSlice.test.tsx | 2 +- src/state/slices/windowSlice.test.tsx | 4 +- .../dataHeader.component.test.tsx | 2 +- src/table/table.component.test.tsx | 2 +- src/traces/traceWindow.component.test.tsx | 2 +- src/views/dataView.component.test.tsx | 2 +- src/views/recordTable.component.test.tsx | 2 +- .../thumbnailSelector.component.test.tsx | 2 +- src/windows/windowButtons.component.test.tsx | 2 +- 43 files changed, 120 insertions(+), 98 deletions(-) diff --git a/src/api/__snapshots__/records.test.tsx.snap b/src/api/__snapshots__/records.test.tsx.snap index 35572942c..3a9caf9f9 100644 --- a/src/api/__snapshots__/records.test.tsx.snap +++ b/src/api/__snapshots__/records.test.tsx.snap @@ -1,8 +1,8 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`records api functions useRecordsPaginated sends request to fetch records, returns successful response and uses a select function to format the results 1`] = ` -Array [ - Object { +exports[`records api functions > useRecordsPaginated > sends request to fetch records, returns successful response and uses a select function to format the results 1`] = ` +[ + { "CHANNEL_ABCDE": 1, "_id": "1", "activeArea": undefined, @@ -10,7 +10,7 @@ Array [ "shotnum": 1, "timestamp": "2022-01-01 00:00:00", }, - Object { + { "CHANNEL_ABCDE": 2, "_id": "2", "activeArea": undefined, @@ -18,7 +18,7 @@ Array [ "shotnum": 2, "timestamp": "2022-01-02 00:00:00", }, - Object { + { "CHANNEL_ABCDE": 3, "_id": "3", "activeArea": undefined, @@ -26,7 +26,7 @@ Array [ "shotnum": 3, "timestamp": "2022-01-03 00:00:00", }, - Object { + { "CHANNEL_BCDEF": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChi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GUAIABJAG4AYwAuACAAMgAwADEANv/bAEMAAwICAwICAwMDAwQDAwQFCAUFBAQFCgcHBggMCgwMCwoLCw0OEhANDhEOCwsQFhARExQVFRUMDxcYFhQYEhQVFP/bAEMBAwQEBQQFCQUFCRQNCw0UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFP/AABEIABkAGQMBIgACEQEDEQH/xAAbAAABBAMAAAAAAAAAAAAAAAAFAAYICQECB//EACYQAAICAgICAQQDAQAAAAAAAAECAwQFBhESABMHISIxQRQVFkL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8ArB1DXTt+24bBLfpYpsnchpi9kpvTWr+xwvslf/lF55J/QB8fGX+GasFvP2MbscN3XtetNUy+SlgCPXYSMkZSNXYTLKVIjKN9SD39a/cR2iYbGZHDM9ajjc3szW2iGOy981Ilg6p0eIB4vbIzl16+wkAD7G7crYLgdP0nIfEuxZLNQXa23x2n9mLpasktC4/EX9lJJIa7FllYS9GEqnotbpzLyGCtXb8BFrWbNOvae7XetWtxTyQiJ2SaCOZeyBmCkCQAgMRyD9fA3kg/mqvrNbHbjHl9bxeK2d7dSXXr2Nyzu7UQAEhlpB5BFzXeJgz+vj1qqqeWIj54BrSs3DrO54HMWI3lr4/IV7ciRcdmWORWIHP054H78f2U+QdO1nHf5vUKuYyeq5anWfYTm/VXuWraDk+hoy6xRxP2aPkMSWIk7gADlR/J8x4B/dM1Qy9rHR47+TJWo0o6gs3EVJp+pYhmVWYDqGCAdj9sa/j8BvebeLwP/9k=", "_id": "5", "activeArea": undefined, @@ -42,7 +42,7 @@ Array [ "shotnum": 5, "timestamp": "2022-01-05 00:00:00", }, - Object { + { "CHANNEL_BCDEF": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWi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psnchpi9kpvTWr+xwvslf/lF55J/QB8fGX+GasFvP2MbscN3XtetNUy+SlgCPXYSMkZSNXYTLKVIjKN9SD39a/cR2iYbGZHDM9ajjc3szW2iGOy981Ilg6p0eIB4vbIzl16+wkAD7G7crYLgdP0nIfEuxZLNQXa23x2n9mLpasktC4/EX9lJJIa7FllYS9GEqnotbpzLyGCtXb8BFrWbNOvae7XetWtxTyQiJ2SaCOZeyBmCkCQAgMRyD9fA3kg/mqvrNbHbjHl9bxeK2d7dSXXr2Nyzu7UQAEhlpB5BFzXeJgz+vj1qqqeWIj54BrSs3DrO54HMWI3lr4/IV7ciRcdmWORWIHP054H78f2U+QdO1nHf5vUKuYyeq5anWfYTm/VXuWraDk+hoy6xRxP2aPkMSWIk7gADlR/J8x4B/dM1Qy9rHR47+TJWo0o6gs3EVJp+pYhmVWYDqGCAdj9sa/j8BvebeLwP/9k=", "_id": "6", "activeArea": undefined, @@ -50,7 +50,7 @@ Array [ "shotnum": 6, "timestamp": "2022-01-06 00:00:00", }, - Object { + { "CHANNEL_CDEFG": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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iXHc3Cny1Ydq42kp3CC7j1lHdgbj7gYxWV+Lp4Kw+kU6R0pux4LamLdNiBt+/QYuvxvQ/lVH0r/LHJXSPZ022JyWySLVTwFDqRVMt/ncL5gt5YeqozLTuq+/a636MNx97Yz8XjDLYNXDp511HUbKu5+rDn43ofyqj6V/lgV0/rsNtmOSVmkq1WWuU90UzzX7XQgA/O58sLFPX+LstTLa1Y6edS8T3OldzY/5YWFRPZlkfJ//2Q==", "_id": "9", "activeArea": undefined, @@ -74,7 +74,7 @@ Array [ "shotnum": 9, "timestamp": "2022-01-09 00:00:00", }, - Object { + { "CHANNEL_DEFGH": 10, "_id": "10", "activeArea": undefined, @@ -82,7 +82,7 @@ Array [ "shotnum": 10, "timestamp": "2022-01-10 00:00:00", }, - Object { + { "CHANNEL_DEFGH": 11, "_id": "11", "activeArea": undefined, @@ -90,7 +90,7 @@ Array [ "shotnum": 9, "timestamp": "2022-01-11 00:00:00", }, - Object { + { "CHANNEL_DEFGH": 12, "_id": "12", "activeArea": undefined, @@ -98,7 +98,7 @@ Array [ "shotnum": 12, "timestamp": "2022-01-12 00:00:00", }, - Object { + { "CHANNEL_EFGHI": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAA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KuYyeq5anWfYTm/VXuWraDk+hoy6xRxP2aPkMSWIk7gADlR/J8x4B/dM1Qy9rHR47+TJWo0o6gs3EVJp+pYhmVWYDqGCAdj9sa/j8BvebeLwP/9k=", "_id": "13", "activeArea": undefined, @@ -106,7 +106,7 @@ Array [ "shotnum": 13, "timestamp": "2022-01-13 00:00:00", }, - Object { + { "CHANNEL_EFGHI": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADTLW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAwADEANv/bAEMAAwICAwICAwMDAwQDAwQFCAUFBAQFCgcHBggMCgwMCwoLCw0OEhANDhEOCwsQFhARExQVFRUMDxcYFhQYEhQVFP/bAEMBAwQEBQQFCQUFCRQNCw0UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFP/AABEIABkAGQMBIgACEQEDEQH/xAAbAAABBAMAAAAAAAAAAAAAAAAFAAYICQECB//EACYQAAICAgICAQQDAQAAAAAAAAECAwQFBhESABMHISIxQRQVFkL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8ArB1DXTt+24bBLfpYpsnchpi9kpvTWr+xwvslf/lF55J/QB8fGX+GasFvP2MbscN3XtetNUy+SlgCPXYSMkZSNXYTLKVIjKN9SD39a/cR2iYbGZHDM9ajjc3szW2iGOy981Ilg6p0eIB4vbIzl16+wkAD7G7crYLgdP0nIfEuxZLNQXa23x2n9mLpasktC4/EX9lJJIa7FllYS9GEqnotbpzLyGCtXb8BFrWbNOvae7XetWtxTyQiJ2SaCOZeyBmCkCQAgMRyD9fA3kg/mqvrNbHbjHl9bxeK2d7dSXXr2Nyzu7UQAEhlpB5BFzXeJgz+vj1qqqeWIj54BrSs3DrO54HMWI3lr4/IV7ciRcdmWORWIHP054H78f2U+QdO1nHf5vUKuYyeq5anWfYTm/VXuWraDk+hoy6xRxP2aPkMSWIk7gADlR/J8x4B/dM1Qy9rHR47+TJWo0o6gs3EVJp+pYhmVWYDqGCAdj9sa/j8BvebeLwP/9k=", "_id": "14", "activeArea": undefined, @@ -114,7 +114,7 @@ Array [ "shotnum": 14, "timestamp": "2022-01-14 00:00:00", }, - Object { + { "CHANNEL_EFGHI": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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l16+wkAD7G7crYLgdP0nIfEuxZLNQXa23x2n9mLpasktC4/EX9lJJIa7FllYS9GEqnotbpzLyGCtXb8BFrWbNOvae7XetWtxTyQiJ2SaCOZeyBmCkCQAgMRyD9fA3kg/mqvrNbHbjHl9bxeK2d7dSXXr2Nyzu7UQAEhlpB5BFzXeJgz+vj1qqqeWIj54BrSs3DrO54HMWI3lr4/IV7ciRcdmWORWIHP054H78f2U+QdO1nHf5vUKuYyeq5anWfYTm/VXuWraDk+hoy6xRxP2aPkMSWIk7gADlR/J8x4B/dM1Qy9rHR47+TJWo0o6gs3EVJp+pYhmVWYDqGCAdj9sa/j8BvebeLwP/9k=", "_id": "15", "activeArea": undefined, @@ -122,7 +122,7 @@ Array [ "shotnum": 15, "timestamp": "2022-01-15 00:00:00", }, - Object { + { "CHANNEL_FGHIJ": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAA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ncL5gt5YeqozLTuq+/a636MNx97Yz8XjDLYNXDp511HUbKu5+rDn43ofyqj6V/lgV0/rsNtmOSVmkq1WWuU90UzzX7XQgA/O58sLFPX+LstTLa1Y6edS8T3OldzY/5YWFRPZlkfJ//2Q==", "CHANNEL_GHIJK": 18, "_id": "18", diff --git a/src/api/channels.test.tsx b/src/api/channels.test.tsx index 444c39a4e..e7a1176ab 100644 --- a/src/api/channels.test.tsx +++ b/src/api/channels.test.tsx @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import { renderHook, waitFor } from '@testing-library/react'; -import { http } from 'msw'; +import { http, HttpResponse } from 'msw'; import { FullChannelMetadata, timeChannelName } from '../app.types'; import { server } from '../mocks/server'; import { RootState } from '../state/store'; @@ -20,7 +20,7 @@ import { describe('channels api functions', () => { afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useAvailableColumns', () => { @@ -77,8 +77,8 @@ describe('channels api functions', () => { it('returns no columns if no data was present in the request response', async () => { server.use( - http.get('/channels', (req, res, ctx) => { - return res(ctx.status(200), ctx.json({ channels: {} })); + http.get('/channels', () => { + return HttpResponse.json({ channels: {} }, { status: 200 }); }) ); @@ -168,8 +168,8 @@ describe('channels api functions', () => { it('returns no channels if no data was present in the request response', async () => { server.use( - http.get('/channels', (req, res, ctx) => { - return res(ctx.status(200), ctx.json({ channels: {} })); + http.get('/channels', () => { + return HttpResponse.json({ channels: {} }, { status: 200 }); }) ); diff --git a/src/api/experiment.test.tsx b/src/api/experiment.test.tsx index a917c26ae..6f89bcb30 100644 --- a/src/api/experiment.test.tsx +++ b/src/api/experiment.test.tsx @@ -6,7 +6,7 @@ import { useExperiment } from './experiment'; describe('channels api functions', () => { afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useExperiment', () => { diff --git a/src/api/export.test.tsx b/src/api/export.test.tsx index cdf437fa6..543c61076 100644 --- a/src/api/export.test.tsx +++ b/src/api/export.test.tsx @@ -50,7 +50,7 @@ describe('useExportData', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); document.createElement = document.originalCreateElement; document.body.appendChild = document.body.originalAppendChild; }); diff --git a/src/api/images.test.tsx b/src/api/images.test.tsx index aa0b68d5f..af0ed9dbb 100644 --- a/src/api/images.test.tsx +++ b/src/api/images.test.tsx @@ -5,7 +5,7 @@ import { useColourBar, useColourMaps, useImage } from './images'; describe('images api functions', () => { afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useImage', () => { @@ -34,7 +34,7 @@ describe('images api functions', () => { params.set('original_image', 'true'); expect(result.current.data).toEqual('testObjectUrl'); - expect(request.url.searchParams).toEqual(params); + expect(new URL(request.url).searchParams).toEqual(params); }); it('sends request to fetch original image with empty false colour params and returns successful response', async () => { @@ -56,7 +56,7 @@ describe('images api functions', () => { params.set('original_image', 'true'); expect(result.current.data).toEqual('testObjectUrl'); - expect(request.url.searchParams).toEqual(params); + expect(new URL(request.url).searchParams).toEqual(params); }); it('sends request to fetch false colour image and returns successful response', async () => { @@ -88,7 +88,7 @@ describe('images api functions', () => { params.set('upper_level', '200'); expect(result.current.data).toEqual('testObjectUrl'); - expect(request.url.searchParams).toEqual(params); + expect(new URL(request.url).searchParams).toEqual(params); }); it.todo( @@ -129,7 +129,7 @@ describe('images api functions', () => { params.set('upper_level', '200'); expect(result.current.data).toEqual('testObjectUrl'); - expect(request.url.searchParams).toEqual(params); + expect(new URL(request.url).searchParams).toEqual(params); }); it.todo( diff --git a/src/api/records.test.tsx b/src/api/records.test.tsx index 7115a1e23..ad0c52e47 100644 --- a/src/api/records.test.tsx +++ b/src/api/records.test.tsx @@ -38,7 +38,7 @@ describe('records api functions', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useRecordCount', () => { @@ -103,7 +103,9 @@ describe('records api functions', () => { '{"$and":[{"metadata.timestamp":{"$gte":"2022-01-01 00:00:00","$lte":"2022-01-02 00:00:00"}},{"metadata.shotnum":{"$gt":300}}]}' ); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); expect(result.current.data).toEqual(recordsJson.length); }); @@ -132,7 +134,9 @@ describe('records api functions', () => { const request = await pendingRequest; // We should have made one call to /records/count - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); expect(incomingRecordCountResult.current.data).toEqual( recordsJson.length ); @@ -306,7 +310,9 @@ describe('records api functions', () => { '{"$and":[{"metadata.timestamp":{"$gte":"2022-01-01 00:00:00","$lte":"2022-01-02 00:00:00"}},{"metadata.shotnum":{"$gt":300}}]}' ); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); expect(result.current.data).toEqual(recordsJson.length); }); @@ -353,7 +359,9 @@ describe('records api functions', () => { '{"$and":[{"metadata.timestamp":{"$gte":"2022-01-01 00:00:00","$lte":"2022-01-02 00:00:00"}},{"metadata.shotnum":{"$gt":300}}]}' ); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); expect(result.current.data).toEqual(recordsJson.length); }); @@ -387,7 +395,9 @@ describe('records api functions', () => { params.append('skip', '0'); params.append('limit', '25'); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); expect(result.current.data).toMatchSnapshot(); }); @@ -446,7 +456,9 @@ describe('records api functions', () => { params.append('skip', '0'); params.append('limit', '25'); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); }); }); @@ -470,7 +482,7 @@ describe('records api functions', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('uses a select function to format the results', async () => { @@ -508,7 +520,9 @@ describe('records api functions', () => { params.append('skip', '0'); params.append('limit', '50'); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); const expectedData: PlotDataset[] = [ { @@ -592,7 +606,9 @@ describe('records api functions', () => { params.append('skip', '0'); params.append('limit', '1000'); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); const expectedData: PlotDataset[] = [ { @@ -659,7 +675,9 @@ describe('records api functions', () => { '{"$or":' + JSON.stringify(existsConditions) + '}' ); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); }); }); @@ -671,7 +689,7 @@ describe('records api functions', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('sends request to fetch records with a projection and returns successful response', async () => { @@ -699,7 +717,9 @@ describe('records api functions', () => { params.append('skip', '25'); params.append('limit', '25'); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); expect(result.current.data).toEqual(recordsJson); }); @@ -757,7 +777,9 @@ describe('records api functions', () => { params.append('skip', '0'); params.append('limit', '25'); - expect(request.url.searchParams.toString()).toEqual(params.toString()); + expect(new URL(request.url).searchParams.toString()).toEqual( + params.toString() + ); }); }); diff --git a/src/api/sessions.test.tsx b/src/api/sessions.test.tsx index d2456dae2..6725ab2c0 100644 --- a/src/api/sessions.test.tsx +++ b/src/api/sessions.test.tsx @@ -22,7 +22,7 @@ describe('session api functions', () => { }; }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useSaveSession', () => { diff --git a/src/api/userPreferences.test.tsx b/src/api/userPreferences.test.tsx index 0ae4d7a1f..a91b32560 100644 --- a/src/api/userPreferences.test.tsx +++ b/src/api/userPreferences.test.tsx @@ -10,7 +10,7 @@ describe('user preferences api functions', () => { const axiosDelete = jest.spyOn(axios, 'delete'); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useUserPreference', () => { diff --git a/src/api/waveforms.test.tsx b/src/api/waveforms.test.tsx index 7ea9f4d2b..60c6266ed 100644 --- a/src/api/waveforms.test.tsx +++ b/src/api/waveforms.test.tsx @@ -4,7 +4,7 @@ import { useWaveform } from './waveforms'; describe('waveform api functions', () => { afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('useWaveform', () => { diff --git a/src/channels/channelTree.component.test.tsx b/src/channels/channelTree.component.test.tsx index 1df85b6bc..5a461774f 100644 --- a/src/channels/channelTree.component.test.tsx +++ b/src/channels/channelTree.component.test.tsx @@ -61,7 +61,7 @@ describe('Channel Tree', () => { }; beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('should render correctly for root', () => { diff --git a/src/channels/channelsDialogue.component.test.tsx b/src/channels/channelsDialogue.component.test.tsx index 0ae269920..e82857409 100644 --- a/src/channels/channelsDialogue.component.test.tsx +++ b/src/channels/channelsDialogue.component.test.tsx @@ -116,7 +116,7 @@ describe('Channels Dialogue', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders channels dialogue when dialogue is open', async () => { diff --git a/src/filtering/filterDialogue.component.test.tsx b/src/filtering/filterDialogue.component.test.tsx index cf662e06c..bc1e5eaaf 100644 --- a/src/filtering/filterDialogue.component.test.tsx +++ b/src/filtering/filterDialogue.component.test.tsx @@ -34,7 +34,7 @@ describe('Filter dialogue component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders filter dialogue when dialogue is open', async () => { diff --git a/src/images/falseColourPanel.component.test.tsx b/src/images/falseColourPanel.component.test.tsx index 234053fbf..e4d38f623 100644 --- a/src/images/falseColourPanel.component.test.tsx +++ b/src/images/falseColourPanel.component.test.tsx @@ -20,11 +20,11 @@ describe('False colour panel component', () => { changeUpperLevel, }; - jest.clearAllMocks(); + vi.clearAllMocks(); }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); const createView = () => { @@ -61,7 +61,7 @@ describe('False colour panel component', () => { expect(changeColourMap).toHaveBeenCalledWith('cividis'); - jest.clearAllMocks(); + vi.clearAllMocks(); // check user can select "default" colourmap await user.click(select); @@ -120,7 +120,7 @@ describe('False colour panel component', () => { expect(changeUpperLevel).toHaveBeenCalledWith(undefined); expect(extendedColourMapSwitch).toBeDisabled(); - jest.clearAllMocks(); + vi.clearAllMocks(); await user.click(falseColourSwitch); @@ -144,7 +144,7 @@ describe('False colour panel component', () => { await user.click(within(dropdown).getByRole('option', { name: 'cividis' })); await user.click(falseColourSwitch); - jest.clearAllMocks(); + vi.clearAllMocks(); await user.click(falseColourSwitch); expect(falseColourSwitch).toBeChecked(); @@ -182,7 +182,7 @@ describe('False colour panel component', () => { expect(reverseColourSwitch).toBeChecked(); expect(changeColourMap).toHaveBeenCalledWith('inferno_r'); - jest.clearAllMocks(); + vi.clearAllMocks(); const select2 = screen.getByLabelText('Colour Map'); await user.click(select); @@ -199,14 +199,14 @@ describe('False colour panel component', () => { expect(changeColourMap).toHaveBeenCalledWith('cividis_r'); - jest.clearAllMocks(); + vi.clearAllMocks(); await user.click(reverseColourSwitch); expect(changeColourMap).toHaveBeenCalledWith('cividis'); await user.click(reverseColourSwitch); - jest.clearAllMocks(); + vi.clearAllMocks(); // the reverse colour is disabled when it doesn't exist diff --git a/src/images/imageWindow.component.test.tsx b/src/images/imageWindow.component.test.tsx index 31f3110c9..cd2c24f82 100644 --- a/src/images/imageWindow.component.test.tsx +++ b/src/images/imageWindow.component.test.tsx @@ -39,7 +39,7 @@ describe('Image Window component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); const createView = () => { diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index a10d58612..c0ffc7ac2 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -63,7 +63,7 @@ export const handlers = [ const validId = [1, 2, 3, 4]; if (validId.includes(Number(id))) { - return HttpResponse.json(null, { status: 204 }); + return new HttpResponse(null, { status: 204 }); } else HttpResponse.json(null, { status: 422 }); }), http.get('/sessions/list', async () => { @@ -277,7 +277,7 @@ export const handlers = [ if (typeof preferredColourMap === 'undefined') { return HttpResponse.json( { detail: 'No such attribute in database' }, - { status: 200 } + { status: 404 } ); } else { return HttpResponse.json(preferredColourMap, { status: 200 }); diff --git a/src/plotting/plotSettings/chartTypeButtons.component.test.tsx b/src/plotting/plotSettings/chartTypeButtons.component.test.tsx index 1e520dc07..5907050e4 100644 --- a/src/plotting/plotSettings/chartTypeButtons.component.test.tsx +++ b/src/plotting/plotSettings/chartTypeButtons.component.test.tsx @@ -21,7 +21,7 @@ describe('Chart Type Buttons', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('calls changePlotType and changeXAxis when XY button is clicked', async () => { diff --git a/src/plotting/plotSettings/moreOptions/moreOptionsBox.component.test.tsx b/src/plotting/plotSettings/moreOptions/moreOptionsBox.component.test.tsx index 1478c2d49..13233ceae 100644 --- a/src/plotting/plotSettings/moreOptions/moreOptionsBox.component.test.tsx +++ b/src/plotting/plotSettings/moreOptions/moreOptionsBox.component.test.tsx @@ -41,7 +41,7 @@ describe('MoreOptionsBox', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', () => { diff --git a/src/plotting/plotSettings/moreOptions/moreOptionsToggle.component.test.tsx b/src/plotting/plotSettings/moreOptions/moreOptionsToggle.component.test.tsx index 4efb7b4e7..53060e300 100644 --- a/src/plotting/plotSettings/moreOptions/moreOptionsToggle.component.test.tsx +++ b/src/plotting/plotSettings/moreOptions/moreOptionsToggle.component.test.tsx @@ -51,7 +51,7 @@ describe('MoreOptionsToggle', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly when options box not open', () => { diff --git a/src/plotting/plotSettings/plotSettingsController.component.test.tsx b/src/plotting/plotSettings/plotSettingsController.component.test.tsx index d8c122fb7..31edaf417 100644 --- a/src/plotting/plotSettings/plotSettingsController.component.test.tsx +++ b/src/plotting/plotSettings/plotSettingsController.component.test.tsx @@ -65,7 +65,7 @@ describe('Plot Settings component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); describe('snapshots', () => { diff --git a/src/plotting/plotSettings/xAxisTab.component.test.tsx b/src/plotting/plotSettings/xAxisTab.component.test.tsx index d5426c5a6..f4f20e97c 100644 --- a/src/plotting/plotSettings/xAxisTab.component.test.tsx +++ b/src/plotting/plotSettings/xAxisTab.component.test.tsx @@ -37,7 +37,7 @@ describe('x-axis tab', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly with arbitrary x axis', () => { diff --git a/src/plotting/plotSettings/yAxisTab.component.test.tsx b/src/plotting/plotSettings/yAxisTab.component.test.tsx index 9e7bdf3e5..ead39e065 100644 --- a/src/plotting/plotSettings/yAxisTab.component.test.tsx +++ b/src/plotting/plotSettings/yAxisTab.component.test.tsx @@ -56,7 +56,7 @@ describe('y-axis tab', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', () => { diff --git a/src/plotting/plotWindow.component.test.tsx b/src/plotting/plotWindow.component.test.tsx index 827d06b3c..30085947e 100644 --- a/src/plotting/plotWindow.component.test.tsx +++ b/src/plotting/plotWindow.component.test.tsx @@ -43,7 +43,7 @@ describe('Plot Window component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); const createView = () => { diff --git a/src/search/components/dataRefresh.component.test.tsx b/src/search/components/dataRefresh.component.test.tsx index 1ba3b6eee..9c24aaf63 100644 --- a/src/search/components/dataRefresh.component.test.tsx +++ b/src/search/components/dataRefresh.component.test.tsx @@ -18,7 +18,7 @@ describe('DataRefresh', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', () => { diff --git a/src/search/components/dateTime.component.test.tsx b/src/search/components/dateTime.component.test.tsx index 72e151129..997d449ff 100644 --- a/src/search/components/dateTime.component.test.tsx +++ b/src/search/components/dateTime.component.test.tsx @@ -138,7 +138,7 @@ describe('renderExperimentPickerDay function', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders a PickersDay component when selectedDate is with an experiment', () => { @@ -193,7 +193,7 @@ describe('verifyAndUpdateDate function', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('calls changeDate if otherDate is null', () => { @@ -296,7 +296,7 @@ describe('DateTime tests', () => { afterEach(() => { cleanupDatePickerWorkaround(); - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly with no input date-time ranges', () => { diff --git a/src/search/components/experiment.component.test.tsx b/src/search/components/experiment.component.test.tsx index d4e427b9e..3811470f6 100644 --- a/src/search/components/experiment.component.test.tsx +++ b/src/search/components/experiment.component.test.tsx @@ -36,7 +36,7 @@ describe('Experiment search', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { diff --git a/src/search/components/maxShots.component.test.tsx b/src/search/components/maxShots.component.test.tsx index f119324bd..589d53c01 100644 --- a/src/search/components/maxShots.component.test.tsx +++ b/src/search/components/maxShots.component.test.tsx @@ -17,7 +17,7 @@ describe('maxShots search', () => { }; afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly with a selected value', () => { @@ -40,7 +40,7 @@ describe('maxShots search', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('50 shots', async () => { diff --git a/src/search/components/shotNumber.component.test.tsx b/src/search/components/shotNumber.component.test.tsx index 82f1f4d68..053d08b6b 100644 --- a/src/search/components/shotNumber.component.test.tsx +++ b/src/search/components/shotNumber.component.test.tsx @@ -35,7 +35,7 @@ describe('shotNumber search', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { diff --git a/src/search/components/timeframe.component.test.tsx b/src/search/components/timeframe.component.test.tsx index ce50a08d0..b03da4f77 100644 --- a/src/search/components/timeframe.component.test.tsx +++ b/src/search/components/timeframe.component.test.tsx @@ -31,7 +31,7 @@ describe('timeframe search', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { diff --git a/src/search/searchBar.component.test.tsx b/src/search/searchBar.component.test.tsx index 0f9f3b801..6b801fd76 100644 --- a/src/search/searchBar.component.test.tsx +++ b/src/search/searchBar.component.test.tsx @@ -41,7 +41,7 @@ describe('searchBar component', () => { afterEach(() => { cleanupDatePickerWorkaround(); - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('dispatches changeSearchParams on search button click for a given date range', async () => { diff --git a/src/session/deleteSessionDialogue.component.test.tsx b/src/session/deleteSessionDialogue.component.test.tsx index 1f42517fc..931a3e712 100644 --- a/src/session/deleteSessionDialogue.component.test.tsx +++ b/src/session/deleteSessionDialogue.component.test.tsx @@ -33,7 +33,7 @@ describe('delete session dialogue', () => { user = userEvent; // Assigning userEvent to 'user' }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { createView(); diff --git a/src/session/sessionDialogue.component.test.tsx b/src/session/sessionDialogue.component.test.tsx index 9cc37ee8f..572d52a2c 100644 --- a/src/session/sessionDialogue.component.test.tsx +++ b/src/session/sessionDialogue.component.test.tsx @@ -36,7 +36,7 @@ describe('session dialogue', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('displays warning message when name field is not defined', async () => { @@ -126,7 +126,7 @@ describe('session dialogue', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('prefills the name and summary with the current session', async () => { diff --git a/src/session/sessionDrawer.component.test.tsx b/src/session/sessionDrawer.component.test.tsx index bc76f7466..74e07b73a 100644 --- a/src/session/sessionDrawer.component.test.tsx +++ b/src/session/sessionDrawer.component.test.tsx @@ -31,7 +31,7 @@ describe('session Drawer', () => { }; }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { diff --git a/src/session/sessionSaveButtons.component.test.tsx b/src/session/sessionSaveButtons.component.test.tsx index ac741bbb1..fb30cfe7c 100644 --- a/src/session/sessionSaveButtons.component.test.tsx +++ b/src/session/sessionSaveButtons.component.test.tsx @@ -55,7 +55,7 @@ describe('session buttons', () => { afterEach(() => { jest.useRealTimers(); - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', () => { diff --git a/src/settingsMenuItems.component.test.tsx b/src/settingsMenuItems.component.test.tsx index ae088f9a3..a8028f8df 100644 --- a/src/settingsMenuItems.component.test.tsx +++ b/src/settingsMenuItems.component.test.tsx @@ -24,7 +24,7 @@ describe('Settings Menu Items component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); const createView = (preloadedState?: Partial) => { diff --git a/src/state/slices/plotSlice.test.tsx b/src/state/slices/plotSlice.test.tsx index 42c34947a..3b19cf2a8 100644 --- a/src/state/slices/plotSlice.test.tsx +++ b/src/state/slices/plotSlice.test.tsx @@ -23,7 +23,7 @@ describe('plotSlice', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('createPlot handles assigning an untitled name correctly & creates a plot with the default options', () => { diff --git a/src/state/slices/windowSlice.test.tsx b/src/state/slices/windowSlice.test.tsx index 7e3702a2c..98059e48a 100644 --- a/src/state/slices/windowSlice.test.tsx +++ b/src/state/slices/windowSlice.test.tsx @@ -1,3 +1,4 @@ +import { DEFAULT_WINDOW_VARS } from '../../app.types'; import WindowReducer, { closeWindow, initialState, @@ -5,7 +6,6 @@ import WindowReducer, { openTraceWindow, TraceOrImageWindow, } from './windowSlice'; -import { DEFAULT_WINDOW_VARS } from '../../app.types'; describe('windowSlice', () => { describe('Reducer', () => { @@ -21,7 +21,7 @@ describe('windowSlice', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('openTraceWindow creates a trace with the default options', () => { diff --git a/src/table/headerRenderers/dataHeader.component.test.tsx b/src/table/headerRenderers/dataHeader.component.test.tsx index a05c9536b..06582c56b 100644 --- a/src/table/headerRenderers/dataHeader.component.test.tsx +++ b/src/table/headerRenderers/dataHeader.component.test.tsx @@ -63,7 +63,7 @@ describe('Data Header', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', () => { diff --git a/src/table/table.component.test.tsx b/src/table/table.component.test.tsx index 1d4f7602d..992805f65 100644 --- a/src/table/table.component.test.tsx +++ b/src/table/table.component.test.tsx @@ -87,7 +87,7 @@ describe('Table', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly, with only timestamp column', () => { diff --git a/src/traces/traceWindow.component.test.tsx b/src/traces/traceWindow.component.test.tsx index 3ef6367a5..d815d5943 100644 --- a/src/traces/traceWindow.component.test.tsx +++ b/src/traces/traceWindow.component.test.tsx @@ -39,7 +39,7 @@ describe('Trace Window component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); const createView = () => { diff --git a/src/views/dataView.component.test.tsx b/src/views/dataView.component.test.tsx index d4bbd960b..6d7ecd068 100644 --- a/src/views/dataView.component.test.tsx +++ b/src/views/dataView.component.test.tsx @@ -25,7 +25,7 @@ describe('Data View', () => { }; afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { diff --git a/src/views/recordTable.component.test.tsx b/src/views/recordTable.component.test.tsx index 042e8e127..fbe80ccbb 100644 --- a/src/views/recordTable.component.test.tsx +++ b/src/views/recordTable.component.test.tsx @@ -51,7 +51,7 @@ describe('Record Table', () => { afterEach(() => { cleanupDatePickerWorkaround(); - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('renders correctly', async () => { diff --git a/src/windows/thumbnailSelector.component.test.tsx b/src/windows/thumbnailSelector.component.test.tsx index 5e6eb4d96..826a34a74 100644 --- a/src/windows/thumbnailSelector.component.test.tsx +++ b/src/windows/thumbnailSelector.component.test.tsx @@ -17,7 +17,7 @@ describe('Thumbnail selector component', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); const createView = (preloadedState?: Partial) => { diff --git a/src/windows/windowButtons.component.test.tsx b/src/windows/windowButtons.component.test.tsx index d4feb4c72..f3f99de8c 100644 --- a/src/windows/windowButtons.component.test.tsx +++ b/src/windows/windowButtons.component.test.tsx @@ -37,7 +37,7 @@ describe('Window buttons components', () => { }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); document.createElement = document.originalCreateElement; document.body.appendChild = document.body.originalAppendChild; });