mirror of
https://github.com/actions/cache.git
synced 2025-04-19 02:26:45 +00:00
Adds input for upload chunk size
This commit is contained in:
parent
d606e039ae
commit
a6f1f4b32e
10 changed files with 84 additions and 11 deletions
|
@ -15,6 +15,7 @@ beforeAll(() => {
|
|||
afterEach(() => {
|
||||
delete process.env[Events.Key];
|
||||
delete process.env[RefKey];
|
||||
testUtils.clearInputs();
|
||||
});
|
||||
|
||||
test("isGhes returns true if server url is not github.com", () => {
|
||||
|
@ -212,3 +213,17 @@ test("getInputAsArray handles empty lines correctly", () => {
|
|||
testUtils.setInput("foo", "\n\nbar\n\nbaz\n\n");
|
||||
expect(actionUtils.getInputAsArray("foo")).toEqual(["bar", "baz"]);
|
||||
});
|
||||
|
||||
test("getInputAsInt returns undefined if input not set", () => {
|
||||
expect(actionUtils.getInputAsInt("foo")).toBeUndefined();
|
||||
});
|
||||
|
||||
test("getInputAsInt returns value if input is valid", () => {
|
||||
testUtils.setInput("foo", "8");
|
||||
expect(actionUtils.getInputAsInt("foo")).toBe(8);
|
||||
});
|
||||
|
||||
test("getInputAsInt returns undefined if input is invalid or NaN", () => {
|
||||
testUtils.setInput("foo", "bar");
|
||||
expect(actionUtils.getInputAsInt("foo")).toBeUndefined();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue