From 22993f4793b0ff8e2c449d84fdeb3a46aab85d2f Mon Sep 17 00:00:00 2001 From: Gordon Mickel Date: Sat, 20 Jul 2024 10:26:15 +0200 Subject: [PATCH] fix: windows paths in tests --- tests/unit/file-processor.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/file-processor.test.ts b/tests/unit/file-processor.test.ts index 09bb18c..9f04809 100644 --- a/tests/unit/file-processor.test.ts +++ b/tests/unit/file-processor.test.ts @@ -183,7 +183,9 @@ describe('processFiles', () => { }); expect(result.length).toBe(3); - const mainJsFile = result.find((file) => file.path === cachedFile.path); + const mainJsFile = result.find( + (file) => path.normalize(file.path) === path.normalize(cachedFile.path), + ); expect(mainJsFile).toEqual(cachedFile); expect(FileCache.prototype.get).toHaveBeenCalledTimes(3);