mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-10-09 00:46:11 +00:00
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:
parent
c9fa1ee1e1
commit
1e7fd8c9f7
1 changed files with 2 additions and 1 deletions
|
@ -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'),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue