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.
This commit is contained in:
Taj 2025-08-24 03:07:26 +05:30
parent c9fa1ee1e1
commit 1e7fd8c9f7

View file

@ -10,6 +10,7 @@ import {
} from '../src/util'; } from '../src/util';
import { assert, describe, expect, it } from 'vitest'; import { assert, describe, expect, it } from 'vitest';
import * as path from 'path';
describe('util', () => { describe('util', () => {
describe('uploadUrl', () => { describe('uploadUrl', () => {
@ -385,7 +386,7 @@ describe('util', () => {
describe('paths', () => { describe('paths', () => {
it('resolves files given a set of paths', async () => { it('resolves files given a set of paths', async () => {
assert.deepStrictEqual(paths(['tests/data/**/*', 'tests/data/does/not/exist/*']), [ assert.deepStrictEqual(paths(['tests/data/**/*', 'tests/data/does/not/exist/*']), [
'tests/data/foo/bar.txt', path.join('tests', 'data', 'foo', 'bar.txt'),
]); ]);
}); });
}); });