Skip to content

Commit f481f6e

Browse files
committed
fix: handle platform-specific path separators in UrlContentFetcher test
- Use path.join() in test expectation to match the implementation - Fixes test failure on Windows due to backslash vs forward slash differences
1 parent 3e493c8 commit f481f6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/browser/__tests__/UrlContentFetcher.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"
44
import { UrlContentFetcher } from "../UrlContentFetcher"
55
import { fileExistsAtPath } from "../../../utils/fs"
6+
import * as path from "path"
67

78
// Mock dependencies
89
vi.mock("vscode", () => ({
@@ -113,7 +114,7 @@ describe("UrlContentFetcher", () => {
113114
await urlContentFetcher.launchBrowser()
114115

115116
expect(vi.mocked(PCR)).toHaveBeenCalledWith({
116-
downloadPath: "/test/storage/puppeteer",
117+
downloadPath: path.join("/test/storage", "puppeteer"),
117118
})
118119

119120
const stats = await vi.mocked(PCR).mock.results[0].value

0 commit comments

Comments
 (0)