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
+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
};
})
};
});