moke get artifact name

This commit is contained in:
yimysty
2022-08-04 16:02:46 -07:00
parent 3e976523d7
commit 85b0d1617e

View File

@@ -20,7 +20,14 @@ describe('with all environment variables set', () => {
process.env.GITHUB_ACTOR = 'monalisa'
process.env.GITHUB_ACTION = '__monalisa/octocat'
process.env.GITHUB_ACTION_PATH = 'something'
process.env.ARTIFACT_NAME = 'github-pages'
jest.spyOn(core, 'getInput').mockImplementation(param => {
switch (param) {
case 'artifact_name':
return 'github-pages'
case 'token':
return process.env.GITHUB_TOKEN
}
})
})
it('Executes cleanly', done => {