11
0
Fork 0
mirror of https://github.com/wagoid/commitlint-github-action.git synced 2026-04-04 16:56:52 +00:00

chore(deps): upgrade @commitlint dependencies

Resolves #187
This commit is contained in:
wagoid 2021-07-07 13:30:04 -03:00
parent 8ea34043f2
commit 9e5880e3f8
3 changed files with 10666 additions and 14805 deletions

View file

@ -147,7 +147,7 @@ describe('Commit Linter action', () => {
cwd = await git.bootstrap('fixtures/conventional')
await gitEmptyCommit(cwd, 'message from before push')
await gitEmptyCommit(cwd, 'wrong message 1')
await gitEmptyCommit(cwd, 'chore(WRONG): message 2')
await gitEmptyCommit(cwd, 'wrong message 2')
const [, , to] = await getCommitHashes(cwd)
await createPushEventPayload(cwd, { before: gitEmptySha, to })
updatePushEnvVars(cwd, to)
@ -156,7 +156,7 @@ describe('Commit Linter action', () => {
await runAction()
td.verify(core.setFailed(contains('wrong message 1')), { times: 0 })
td.verify(core.setFailed(contains('chore(WRONG): message 2')))
td.verify(core.setFailed(contains('wrong message 2')))
})
it('should fail for commit with scope that is not a lerna package', async () => {
@ -551,4 +551,26 @@ describe('Commit Linter action', () => {
})
})
})
describe('when commit contains signed-off-by message', () => {
beforeEach(async () => {
cwd = await git.bootstrap('fixtures/conventional')
await gitEmptyCommit(
cwd,
'chore: correct message\n\nsome context without leading blank line\nSigned-off-by: John Doe <john.doe@example.com>',
)
const [to] = await getCommitHashes(cwd)
await createPushEventPayload(cwd, { to })
updatePushEnvVars(cwd, to)
td.replace(process, 'cwd', () => cwd)
td.replace(console, 'log')
})
it('should pass', async () => {
await runAction()
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
td.verify(console.log('Lint free! 🎉'))
})
})
})