Skip to content

Commit b74ccb8

Browse files
committed
chore: update vitest version to 3.2.0
update vitest version to 3.2.0 close AUTH-2075
1 parent 41c97ad commit b74ccb8

File tree

12 files changed

+590
-201
lines changed

12 files changed

+590
-201
lines changed

app-shell-odd/src/system-update/from-web/__tests__/release-files.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,11 @@ describe('downloadReleaseFiles', () => {
404404
(_url, dest, options) =>
405405
new Promise((resolve, reject) => {
406406
const listener = () => {
407-
reject(options.signal.reason)
407+
reject(options?.signal?.reason)
408408
}
409-
options.signal.addEventListener('abort', listener, { once: true })
409+
options?.signal?.addEventListener('abort', listener, {
410+
once: true,
411+
})
410412
aborter.abort('oh no!')
411413
return fs
412414
.writeFile(dest, 'this is the contents of the system.zip')

app/src/local-resources/instruments/__tests__/hooks.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const mockP1000V2Specs = {
120120
minVolume: 0,
121121
},
122122
},
123-
} as PipetteV2Specs
123+
}
124124

125125
describe('pipette data accessor hooks', () => {
126126
beforeEach(() => {

app/src/organisms/Desktop/ChooseRobotToRunProtocolSlideout/__tests__/ChooseRobotToRunProtocolSlideout.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('ChooseRobotToRunProtocolSlideout', () => {
9494
when(vi.mocked(useCreateRunFromProtocol))
9595
.calledWith(
9696
expect.any(Object),
97-
{ hostname: expect.any(String) },
97+
{ hostname: (expect.any(String) as unknown) as string },
9898
expect.any(Array)
9999
)
100100
.thenReturn({

app/src/organisms/Desktop/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ describe('ProtocolRunSetup', () => {
123123
when(vi.mocked(useRequiredSetupStepsInOrder))
124124
.calledWith({
125125
runId: RUN_ID,
126-
protocolAnalysis: expect.any(Object),
126+
protocolAnalysis: (expect.any(
127+
Object
128+
) as unknown) as SharedData.ProtocolAnalysisOutput,
127129
})
128130
.thenReturn({
129131
orderedSteps: [

app/src/organisms/ODD/ProtocolSetup/ProtocolSetupLabware/__tests__/LabwareMapView.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('LabwareMapView', () => {
6565
labwareLocation: { slotName: 'C1' },
6666
definition: fixtureTiprack300ul as LabwareDefinition,
6767
topLabwareId: '300_ul_tiprack_id',
68-
onLabwareClick: expect.any(Function),
68+
onLabwareClick: (expect.any(Function) as unknown) as () => void,
6969
labwareChildren: null,
7070
},
7171
]
@@ -75,7 +75,7 @@ describe('LabwareMapView', () => {
7575
moduleLocation: { slotName: 'B1' },
7676
nestedLabwareDef: mockProtocolModuleInfo[0]
7777
.nestedLabwareDef as LabwareDefinition,
78-
onLabwareClick: expect.any(Function),
78+
onLabwareClick: (expect.any(Function) as unknown) as () => void,
7979
moduleChildren: null,
8080
innerProps: {},
8181
},

app/src/redux/robot-admin/epic/__tests__/trackRestartsEpic.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('robotAdminEpic tracks restarting state', () => {
4242
mocks.robot.name,
4343
'restart-pending',
4444
null,
45-
expect.any(Date)
45+
(expect.any(Date) as unknown) as Date
4646
),
4747
})
4848
})
@@ -70,7 +70,7 @@ describe('robotAdminEpic tracks restarting state', () => {
7070
mocks.robot.name,
7171
'restart-pending',
7272
'previous-boot-id',
73-
expect.any(Date)
73+
(expect.any(Date) as unknown) as Date
7474
),
7575
})
7676
})

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@typescript-eslint/eslint-plugin": "^6.20.0",
7373
"@typescript-eslint/parser": "^6.20.0",
7474
"@vitejs/plugin-react": "4.2.0",
75-
"@vitest/coverage-v8": "2.1.8",
75+
"@vitest/coverage-v8": "3.2.0",
7676
"ajv": "6.12.3",
7777
"aws-sdk": "^2.493.0",
7878
"babel-loader": "^8.2.2",
@@ -154,8 +154,8 @@
154154
"typescript": "5.3.3",
155155
"url-loader": "^2.1.0",
156156
"vite": "5.4.11",
157-
"vitest": "2.1.8",
158-
"vitest-when": "0.5.0",
157+
"vitest": "3.2.0",
158+
"vitest-when": "0.6.1",
159159
"wait-on": "^4.0.2",
160160
"webpack": "^4.41.6",
161161
"webpack-bundle-analyzer": "^3.6.0",

shared-data/js/__tests__/pipettes.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ describe('pipette data accessors', () => {
171171
minVolume: 0,
172172
},
173173
},
174-
} as PipetteV2Specs
174+
}
175175
expect(getPipetteSpecsV2('p1000_single_flex')).toStrictEqual(
176176
mockP1000Specs
177177
)
@@ -258,7 +258,7 @@ describe('pipette data accessors', () => {
258258
},
259259
},
260260
},
261-
} as PipetteV2LiquidSpecs
261+
}
262262
const mockLiquidLowVolume = {
263263
$otSharedSchema: '#/pipette/schemas/2/pipetteLiquidPropertiesSchema.json',
264264
defaultTipracks: [
@@ -339,8 +339,8 @@ describe('pipette data accessors', () => {
339339
},
340340
},
341341
},
342-
} as PipetteV2LiquidSpecs
343-
const mockLiquids: Record<string, PipetteV2LiquidSpecs> = {
342+
}
343+
const mockLiquids = {
344344
default: mockLiquidDefault,
345345
lowVolumeDefault: mockLiquidLowVolume,
346346
}

step-generation/src/__tests__/thermocyclerProfileStep.test.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ describe('thermocyclerProfileStep', () => {
4141
expected: [
4242
{
4343
commandType: 'thermocycler/closeLid',
44-
key: expect.any(String),
44+
key: (expect.any(String) as unknown) as string,
4545
params: {
4646
moduleId: 'thermocyclerId',
4747
},
4848
},
4949
{
5050
commandType: 'thermocycler/setTargetLidTemperature',
51-
key: expect.any(String),
51+
key: (expect.any(String) as unknown) as string,
5252
params: {
5353
moduleId: 'thermocyclerId',
5454
celsius: 55,
5555
},
5656
},
5757
{
5858
commandType: 'thermocycler/runProfile',
59-
key: expect.any(String),
59+
key: (expect.any(String) as unknown) as string,
6060
params: {
6161
moduleId: 'thermocyclerId',
6262
profile: [],
@@ -65,22 +65,22 @@ describe('thermocyclerProfileStep', () => {
6565
},
6666
{
6767
commandType: 'thermocycler/openLid',
68-
key: expect.any(String),
68+
key: (expect.any(String) as unknown) as string,
6969
params: {
7070
moduleId: 'thermocyclerId',
7171
},
7272
},
7373
{
7474
commandType: 'thermocycler/setTargetBlockTemperature',
75-
key: expect.any(String),
75+
key: (expect.any(String) as unknown) as string,
7676
params: {
7777
moduleId: 'thermocyclerId',
7878
celsius: 4,
7979
},
8080
},
8181
{
8282
commandType: 'thermocycler/deactivateLid',
83-
key: expect.any(String),
83+
key: (expect.any(String) as unknown) as string,
8484
params: {
8585
moduleId: 'thermocyclerId',
8686
},
@@ -122,7 +122,7 @@ mock_thermocycler.deactivate_lid()`.trimStart(),
122122
expected: [
123123
{
124124
commandType: 'thermocycler/runProfile',
125-
key: expect.any(String),
125+
key: (expect.any(String) as unknown) as string,
126126
params: {
127127
moduleId: 'thermocyclerId',
128128
profile: [{ celsius: 61, holdSeconds: 99 }],
@@ -131,22 +131,22 @@ mock_thermocycler.deactivate_lid()`.trimStart(),
131131
},
132132
{
133133
commandType: 'thermocycler/openLid',
134-
key: expect.any(String),
134+
key: (expect.any(String) as unknown) as string,
135135
params: {
136136
moduleId: 'thermocyclerId',
137137
},
138138
},
139139
{
140140
commandType: 'thermocycler/setTargetBlockTemperature',
141-
key: expect.any(String),
141+
key: (expect.any(String) as unknown) as string,
142142
params: {
143143
moduleId: 'thermocyclerId',
144144
celsius: 4,
145145
},
146146
},
147147
{
148148
commandType: 'thermocycler/deactivateLid',
149-
key: expect.any(String),
149+
key: (expect.any(String) as unknown) as string,
150150
params: {
151151
moduleId: 'thermocyclerId',
152152
},
@@ -186,14 +186,14 @@ mock_thermocycler.deactivate_lid()`.trimStart(),
186186
expected: [
187187
{
188188
commandType: 'thermocycler/closeLid',
189-
key: expect.any(String),
189+
key: (expect.any(String) as unknown) as string,
190190
params: {
191191
moduleId: 'thermocyclerId',
192192
},
193193
},
194194
{
195195
commandType: 'thermocycler/runProfile',
196-
key: expect.any(String),
196+
key: (expect.any(String) as unknown) as string,
197197
params: {
198198
moduleId: 'thermocyclerId',
199199
profile: [{ celsius: 61, holdSeconds: 99 }],
@@ -202,22 +202,22 @@ mock_thermocycler.deactivate_lid()`.trimStart(),
202202
},
203203
{
204204
commandType: 'thermocycler/openLid',
205-
key: expect.any(String),
205+
key: (expect.any(String) as unknown) as string,
206206
params: {
207207
moduleId: 'thermocyclerId',
208208
},
209209
},
210210
{
211211
commandType: 'thermocycler/setTargetBlockTemperature',
212-
key: expect.any(String),
212+
key: (expect.any(String) as unknown) as string,
213213
params: {
214214
moduleId: 'thermocyclerId',
215215
celsius: 4,
216216
},
217217
},
218218
{
219219
commandType: 'thermocycler/deactivateLid',
220-
key: expect.any(String),
220+
key: (expect.any(String) as unknown) as string,
221221
params: {
222222
moduleId: 'thermocyclerId',
223223
},
@@ -258,7 +258,7 @@ mock_thermocycler.deactivate_lid()`.trimStart(),
258258
expected: [
259259
{
260260
commandType: 'thermocycler/runProfile',
261-
key: expect.any(String),
261+
key: (expect.any(String) as unknown) as string,
262262
params: {
263263
moduleId: 'thermocyclerId',
264264
profile: [{ celsius: 61, holdSeconds: 99 }],
@@ -267,22 +267,22 @@ mock_thermocycler.deactivate_lid()`.trimStart(),
267267
},
268268
{
269269
commandType: 'thermocycler/openLid',
270-
key: expect.any(String),
270+
key: (expect.any(String) as unknown) as string,
271271
params: {
272272
moduleId: 'thermocyclerId',
273273
},
274274
},
275275
{
276276
commandType: 'thermocycler/setTargetBlockTemperature',
277-
key: expect.any(String),
277+
key: (expect.any(String) as unknown) as string,
278278
params: {
279279
moduleId: 'thermocyclerId',
280280
celsius: 4,
281281
},
282282
},
283283
{
284284
commandType: 'thermocycler/deactivateLid',
285-
key: expect.any(String),
285+
key: (expect.any(String) as unknown) as string,
286286
params: {
287287
moduleId: 'thermocyclerId',
288288
},

0 commit comments

Comments
 (0)