mirror of
https://github.com/SamKirkland/FTP-Deploy-Action.git
synced 2026-04-10 12:32:17 +02:00
v4.2.0 beta
- fixes for 550 folder issue - updated excludes option format
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { optionalBoolean, optionalInt, optionalLogLevel, optionalProtocol, optionalSecurity, optionalString, optionalStringArray } from "./parse";
|
||||
import { optionalBoolean, optionalInt, optionalLogLevel, optionalProtocol, optionalSecurity, optionalString } from "./parse";
|
||||
|
||||
describe("boolean", () => {
|
||||
test("false", () => {
|
||||
@@ -103,33 +103,3 @@ describe("security", () => {
|
||||
expect(optionalSecurity("test", "strict")).toBe("strict");
|
||||
});
|
||||
});
|
||||
|
||||
describe("array", () => {
|
||||
test("empty", () => {
|
||||
expect(optionalStringArray("test", "")).toEqual(undefined);
|
||||
});
|
||||
|
||||
test("empty array", () => {
|
||||
expect(optionalStringArray("test", "[]")).toEqual([]);
|
||||
});
|
||||
|
||||
test(`["test.txt"]`, () => {
|
||||
expect(optionalStringArray("test", "[test.txt]")).toEqual(["test.txt"]);
|
||||
});
|
||||
|
||||
test(`[ "test.txt" ]`, () => {
|
||||
expect(optionalStringArray("test", "[ test.txt ]")).toEqual(["test.txt"]);
|
||||
});
|
||||
|
||||
test(`["test.txt", "folder/**/*"]`, () => {
|
||||
expect(optionalStringArray("test", "[test.txt, folder/**/*]")).toEqual(["test.txt", "folder/**/*"]);
|
||||
});
|
||||
|
||||
test(`["test.txt", "folder/**/*", "*other"]`, () => {
|
||||
expect(optionalStringArray("test", `test.txt\n - folder/**/*\n - *other`)).toEqual(["test.txt", "folder/**/*", "*other"]);
|
||||
});
|
||||
|
||||
test(`["test.txt", "folder/**/*", "*other"]`, () => {
|
||||
expect(optionalStringArray("test", `\n - test.txt\n - folder/**/*\n - *other`)).toEqual(["test.txt", "folder/**/*", "*other"]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user