mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 02:44:19 +00:00
Add 'fail_on_unmatched_files' input (#55)
This commit is contained in:
parent
9439581056
commit
4fb86a77e0
6 changed files with 54 additions and 17 deletions
|
@ -3,7 +3,8 @@ import {
|
|||
isTag,
|
||||
paths,
|
||||
parseConfig,
|
||||
parseInputFiles
|
||||
parseInputFiles,
|
||||
unmatchedPatterns
|
||||
} from "../src/util";
|
||||
import * as assert from "assert";
|
||||
|
||||
|
@ -87,7 +88,8 @@ describe("util", () => {
|
|||
input_prerelease: false,
|
||||
input_files: [],
|
||||
input_name: undefined,
|
||||
input_tag_name: undefined
|
||||
input_tag_name: undefined,
|
||||
input_fail_on_unmatched_files: false
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -102,9 +104,19 @@ describe("util", () => {
|
|||
|
||||
describe("paths", () => {
|
||||
it("resolves files given a set of paths", async () => {
|
||||
assert.deepStrictEqual(paths(["tests/data/**/*"]), [
|
||||
"tests/data/foo/bar.txt"
|
||||
]);
|
||||
assert.deepStrictEqual(
|
||||
paths(["tests/data/**/*", "tests/data/does/not/exist/*"]),
|
||||
["tests/data/foo/bar.txt"]
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("unmatchedPatterns", () => {
|
||||
it("returns the patterns that don't match any files", async () => {
|
||||
assert.deepStrictEqual(
|
||||
unmatchedPatterns(["tests/data/**/*", "tests/data/does/not/exist/*"]),
|
||||
["tests/data/does/not/exist/*"]
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue