mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-07 00:36:12 +02:00
Allow artifact retention to be configured
- Default to retaining uploaded artifacts for 7 days. - Add a parameter to allow this to be configured.
This commit is contained in:
parent
f757bcfd86
commit
f381b1f027
4 changed files with 47 additions and 2 deletions
22
test/jest/input-params.test.ts
Normal file
22
test/jest/input-params.test.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import * as inputParams from '../../src/input-params'
|
||||
|
||||
describe('input params', () => {
|
||||
describe('parses numeric input', () => {
|
||||
it('uses default value', () => {
|
||||
const val = inputParams.parseNumericInput('param-name', '', 88)
|
||||
expect(val).toBe(88)
|
||||
})
|
||||
it('parses numeric input', () => {
|
||||
const val = inputParams.parseNumericInput('param-name', '34', 88)
|
||||
expect(val).toBe(34)
|
||||
})
|
||||
it('fails on non-numeric input', () => {
|
||||
const t = () => {
|
||||
inputParams.parseNumericInput('param-name', 'xyz', 88)
|
||||
};
|
||||
|
||||
expect(t).toThrow(TypeError)
|
||||
expect(t).toThrow("The value 'xyz' is not a valid numeric value for 'param-name'.")
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue