Fixes tests

This commit is contained in:
JamesIves 2020-04-09 07:23:17 -04:00
parent 42b62470e4
commit 74276677d4
2 changed files with 8 additions and 8 deletions

View File

@ -316,7 +316,7 @@ describe('git', () => {
await deploy(action)
// Includes the call to generateBranch
expect(execute).toBeCalledTimes(12)
expect(execute).toBeCalledTimes(13)
})
it('should execute commands with single commit toggled', async () => {
@ -334,7 +334,7 @@ describe('git', () => {
await deploy(action)
// Includes the call to generateBranch
expect(execute).toBeCalledTimes(18)
expect(execute).toBeCalledTimes(19)
})
it('should execute commands with clean options, ommits sha commit message', async () => {
@ -354,7 +354,7 @@ describe('git', () => {
await deploy(action)
// Includes the call to generateBranch
expect(execute).toBeCalledTimes(12)
expect(execute).toBeCalledTimes(13)
})
it('should execute commands with clean options stored as an array instead', async () => {
@ -373,7 +373,7 @@ describe('git', () => {
await deploy(action)
// Includes the call to generateBranch
expect(execute).toBeCalledTimes(12)
expect(execute).toBeCalledTimes(13)
})
it('should gracefully handle incorrectly formatted clean exclude items', async () => {
@ -391,7 +391,7 @@ describe('git', () => {
await deploy(action)
expect(execute).toBeCalledTimes(12)
expect(execute).toBeCalledTimes(13)
})
it('should stop early if there is nothing to commit', async () => {
@ -407,7 +407,7 @@ describe('git', () => {
})
await deploy(action)
expect(execute).toBeCalledTimes(13)
expect(execute).toBeCalledTimes(14)
})
it('should throw an error if one of the required parameters is not available', async () => {
@ -427,7 +427,7 @@ describe('git', () => {
try {
await deploy(action)
} catch (e) {
expect(execute).toBeCalledTimes(1)
expect(execute).toBeCalledTimes(2)
expect(e.message).toMatch(
'The deploy step encountered an error: No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true. ❌'
)

View File

@ -42,7 +42,7 @@ describe('main', () => {
debug: true
})
await run(action)
expect(execute).toBeCalledTimes(19)
expect(execute).toBeCalledTimes(20)
})
it('should throw if an error is encountered', async () => {