mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2026-03-31 06:46:56 +00:00
fix: default to .cjs extension in config files
This commit is contained in:
parent
0dd6697d4c
commit
5b6cd1b23a
5 changed files with 11 additions and 9 deletions
|
|
@ -48,7 +48,7 @@ describe('Commit Linter action', () => {
|
|||
td.replace(core, 'getInput')
|
||||
td.replace(core, 'setFailed')
|
||||
td.replace(core, 'setOutput')
|
||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.cjs')
|
||||
td.when(core.getInput('firstParent')).thenReturn('true')
|
||||
td.when(core.getInput('failOnWarnings')).thenReturn('false')
|
||||
td.when(core.getInput('helpURL')).thenReturn(
|
||||
|
|
@ -273,7 +273,7 @@ describe('Commit Linter action', () => {
|
|||
beforeEach(async () => {
|
||||
cwd = await git.bootstrap('fixtures/conventional')
|
||||
td.when(core.getInput('configFile')).thenReturn(
|
||||
'./commitlint.config.js',
|
||||
'./commitlint.config.cjs',
|
||||
)
|
||||
await gitEmptyCommit(cwd, 'message from before push')
|
||||
await gitEmptyCommit(cwd, firstMessage)
|
||||
|
|
@ -341,7 +341,7 @@ describe('Commit Linter action', () => {
|
|||
describe('when it fails to fetch commits', () => {
|
||||
beforeEach(async () => {
|
||||
cwd = await git.bootstrap('fixtures/conventional')
|
||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.js')
|
||||
td.when(core.getInput('configFile')).thenReturn('./commitlint.config.cjs')
|
||||
await gitEmptyCommit(cwd, 'commit message')
|
||||
await createPullRequestEventPayload(cwd)
|
||||
const [to] = await getCommitHashes(cwd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue