Skip to content

Commit 1e7fd8c

Browse files
committed
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.
1 parent c9fa1ee commit 1e7fd8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

__tests__/util.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from '../src/util';
1111

1212
import { assert, describe, expect, it } from 'vitest';
13+
import * as path from 'path';
1314

1415
describe('util', () => {
1516
describe('uploadUrl', () => {
@@ -385,7 +386,7 @@ describe('util', () => {
385386
describe('paths', () => {
386387
it('resolves files given a set of paths', async () => {
387388
assert.deepStrictEqual(paths(['tests/data/**/*', 'tests/data/does/not/exist/*']), [
388-
'tests/data/foo/bar.txt',
389+
path.join('tests', 'data', 'foo', 'bar.txt'),
389390
]);
390391
});
391392
});

0 commit comments

Comments
 (0)