Skip to content

Commit

Permalink
actually read PR this time closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjgrainger committed Mar 29, 2020
1 parent 7816062 commit cd74a9d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions __tests__/create-branch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ describe('Create a branch based on the input', () => {
expect(error).toEqual(new ReferenceError('No token defined in the environment variables'))
}
})

it('fails if branch already exists', async() => {
try {
await createBranch(githubMock, contextMock, branch)
throw Error('should error')
} catch (error) {
expect(error).toEqual(new ReferenceError('Branch already exists'))
}
})
});

class HttpError extends Error {
Expand Down
1 change: 0 additions & 1 deletion src/create-branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export async function createBranch(github: any, context: Context, branch: string
throw Error(error)
}
}
if (branchExists) throw ReferenceError('Branch already exists')
}

function githubToken(): string {
Expand Down

0 comments on commit cd74a9d

Please sign in to comment.