Add make_latest option (#283)

This commit is contained in:
Eric Cornelissen
2022-12-11 19:45:00 +01:00
committed by GitHub
parent 3dd806f2bf
commit 0bf6967166
10 changed files with 70 additions and 4 deletions

View File

@@ -225,6 +225,28 @@ describe('Inputs', () => {
});
})
describe('makeLatest', () => {
it('returns legacy', () => {
mockGetInput.mockReturnValueOnce('legacy')
expect(inputs.makeLatest).toBe('legacy')
})
it('returns false', () => {
mockGetInput.mockReturnValueOnce('false')
expect(inputs.makeLatest).toBe('false')
})
it('returns true', () => {
mockGetInput.mockReturnValueOnce('true')
expect(inputs.makeLatest).toBe('true')
})
it('returns undefined when omitted', () => {
mockGetInput.mockReturnValueOnce('')
expect(inputs.makeLatest).toBeUndefined()
})
})
describe('owner', () => {
it('returns owner from context', function () {
process.env.GITHUB_REPOSITORY = "owner/repo"