From d56b74ffb3327ca8a8d9b61fba375540bb2573e8 Mon Sep 17 00:00:00 2001 From: daniel-lxs Date: Tue, 28 Oct 2025 16:01:14 -0500 Subject: [PATCH] fix(tests): normalize expected path for CDN URI test in imageDataUrl.spec.ts --- src/integrations/misc/__tests__/imageDataUrl.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/integrations/misc/__tests__/imageDataUrl.spec.ts b/src/integrations/misc/__tests__/imageDataUrl.spec.ts index 0ebce80b08..bcbbe048df 100644 --- a/src/integrations/misc/__tests__/imageDataUrl.spec.ts +++ b/src/integrations/misc/__tests__/imageDataUrl.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest" import { normalizeImageRefsToDataUrls } from "../imageDataUrl" import * as fs from "fs/promises" +import * as path from "path" // Mock fs module vi.mock("fs/promises") @@ -28,7 +29,8 @@ describe("normalizeImageRefsToDataUrls", () => { expect(result).toHaveLength(1) expect(result[0]).toMatch(/^data:image\/png;base64,/) - expect(fs.readFile).toHaveBeenCalledWith("/path/to/test.png") + const expectedPath = path.normalize("/path/to/test.png") + expect(fs.readFile).toHaveBeenCalledWith(expectedPath) }) it("should handle mixed arrays of data URLs and CDN URIs", async () => {