From 1e7fd8c9f7924bd473b96f6f7f387d2da8f29a60 Mon Sep 17 00:00:00 2001 From: Taj Date: Sun, 24 Aug 2025 03:07:26 +0530 Subject: [PATCH] fix: Make util.paths test platform-agnostic This commit fixes the `util.paths` test in `__tests__/util.test.ts` to be platform-agnostic by using `path.join` for constructing expected file paths. This resolves the test failure on Windows due to differences in path separators. --- __tests__/util.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__tests__/util.test.ts b/__tests__/util.test.ts index 87e0ad3..4491066 100644 --- a/__tests__/util.test.ts +++ b/__tests__/util.test.ts @@ -10,6 +10,7 @@ import { } from '../src/util'; import { assert, describe, expect, it } from 'vitest'; +import * as path from 'path'; describe('util', () => { describe('uploadUrl', () => { @@ -385,7 +386,7 @@ describe('util', () => { describe('paths', () => { it('resolves files given a set of paths', async () => { assert.deepStrictEqual(paths(['tests/data/**/*', 'tests/data/does/not/exist/*']), [ - 'tests/data/foo/bar.txt', + path.join('tests', 'data', 'foo', 'bar.txt'), ]); }); });