Skip to content

Commit b582463

Browse files
committed
fix: resolve Windows path separator issue in historyMigration test
1 parent e8bcd37 commit b582463

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/__tests__/historyMigration.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"
2+
import path from "path"
23
import { migrateTasksToWorkspaceStructure, isMigrationNeeded } from "../historyMigration"
34

45
// Mock dependencies
@@ -42,7 +43,7 @@ describe("historyMigration", () => {
4243
const result = await isMigrationNeeded("/test/storage")
4344

4445
expect(result).toBe(false)
45-
expect(mockFileExistsAtPath).toHaveBeenCalledWith("/test/storage/tasks")
46+
expect(mockFileExistsAtPath).toHaveBeenCalledWith(path.join("/test/storage", "tasks"))
4647
})
4748

4849
it("should return false when old tasks directory exists but is empty", async () => {

0 commit comments

Comments
 (0)