chore(tools/challenge-helper-scripts): migrate tests to Vitest v4 (#65963)

This commit is contained in:
Jeevankumar S
2026-02-21 11:13:19 +05:30
committed by GitHub
parent 81748f8241
commit 7a7cccc863
3 changed files with 11 additions and 7 deletions
+4 -4
View File
@@ -979,8 +979,8 @@ importers:
specifier: ^8.2.5
version: 8.2.11
'@vitest/ui':
specifier: ^3.2.4
version: 3.2.4(vitest@3.2.4)
specifier: ^4.0.15
version: 4.0.15(vitest@4.0.15)
bson:
specifier: ^7.0.0
version: 7.0.0
@@ -1003,8 +1003,8 @@ importers:
specifier: 5.9.3
version: 5.9.3
vitest:
specifier: ^3.2.4
version: 3.2.4(@types/debug@4.1.12)(@types/node@25.2.3)(@vitest/ui@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@25.2.3)(typescript@5.9.3))(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.1)
specifier: ^4.0.15
version: 4.0.15(@opentelemetry/api@1.9.0)(@types/node@25.2.3)(@vitest/ui@4.0.15)(jiti@2.6.1)(jsdom@26.1.0)(msw@2.12.10(@types/node@25.2.3)(typescript@5.9.3))(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.1)
tools/challenge-parser:
dependencies:
+2 -2
View File
@@ -37,7 +37,7 @@
"@total-typescript/ts-reset": "^0.6.1",
"@types/glob": "^8.0.1",
"@types/inquirer": "^8.2.5",
"@vitest/ui": "^3.2.4",
"@vitest/ui": "^4.0.15",
"bson": "^7.0.0",
"eslint": "^9.39.1",
"glob": "^8.1.0",
@@ -45,6 +45,6 @@
"inquirer": "8.2.6",
"prettier": "3.2.5",
"typescript": "5.9.3",
"vitest": "^3.2.4"
"vitest": "^4.0.15"
}
}
+5 -1
View File
@@ -25,7 +25,11 @@ vi.mock('gray-matter', () => {
vi.mock('bson', () => {
return {
ObjectId: vi.fn(() => ({ toString: () => mockChallengeId }))
ObjectId: vi.fn().mockImplementation(function () {
return {
toString: () => mockChallengeId
};
})
};
});