mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore(tools/challenge-helper-scripts): migrate tests to Vitest v4 (#65963)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user