Skip to content

Commit d56b74f

Browse files
committed
fix(tests): normalize expected path for CDN URI test in imageDataUrl.spec.ts
1 parent f3b31d7 commit d56b74f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/integrations/misc/__tests__/imageDataUrl.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { describe, it, expect, vi, beforeEach } from "vitest"
22
import { normalizeImageRefsToDataUrls } from "../imageDataUrl"
33
import * as fs from "fs/promises"
4+
import * as path from "path"
45

56
// Mock fs module
67
vi.mock("fs/promises")
@@ -28,7 +29,8 @@ describe("normalizeImageRefsToDataUrls", () => {
2829

2930
expect(result).toHaveLength(1)
3031
expect(result[0]).toMatch(/^data:image\/png;base64,/)
31-
expect(fs.readFile).toHaveBeenCalledWith("/path/to/test.png")
32+
const expectedPath = path.normalize("/path/to/test.png")
33+
expect(fs.readFile).toHaveBeenCalledWith(expectedPath)
3234
})
3335

3436
it("should handle mixed arrays of data URLs and CDN URIs", async () => {

0 commit comments

Comments
 (0)