Fix bugs found in E2E testing

This commit is contained in:
Nick Cipollo
2019-08-27 09:50:26 -04:00
parent 0280874154
commit 2b2c872297
10 changed files with 183 additions and 32 deletions

View File

@@ -26,6 +26,12 @@ describe('Inputs', () => {
inputs = new CoreInputs(context)
})
it('reads artifact', () => {
mockGetInput.mockReturnValue("a/path")
mockReadFileSync.mockReturnValue('file')
expect(inputs.artifact).toBe("a/path")
})
it('returns artifact', () => {
mockGetInput.mockReturnValue("a/path")
expect(inputs.artifact).toBe("a/path")
@@ -37,6 +43,11 @@ describe('Inputs', () => {
expect(inputs.artifactContentLength).toBe(100)
})
it('returns artifactName', () => {
mockGetInput.mockReturnValue("a/path")
expect(inputs.artifactName).toBe("path")
})
it('returns targetCommit', () => {
mockGetInput.mockReturnValue("42")
expect(inputs.commit).toBe("42")