diff --git a/@commitlint/cli/src/cli.test.ts b/@commitlint/cli/src/cli.test.ts index b6996957f0..9f628f4d58 100644 --- a/@commitlint/cli/src/cli.test.ts +++ b/@commitlint/cli/src/cli.test.ts @@ -352,7 +352,7 @@ test("it doesn't use parserOpts.commentChar when using edit mode", async () => { test('it uses core.commentChar git config when using edit mode', async () => { const cwd = await gitBootstrap('fixtures/comment-char'); - await execa('git', ['config', 'core.commentChar', '$'], {cwd}); + await execa('git', ['config', '--local', 'core.commentChar', '$'], {cwd}); await fs.writeFile( path.join(cwd, '.git', 'COMMIT_EDITMSG'), 'header: foo\n\n$body\n' @@ -365,7 +365,6 @@ test('it uses core.commentChar git config when using edit mode', async () => { test('it falls back to # for core.commentChar when using edit mode', async () => { const cwd = await gitBootstrap('fixtures/comment-char'); - await execa('git', ['config', '--unset', 'core.commentChar'], {cwd}); await fs.writeFile( path.join(cwd, '.git', 'COMMIT_EDITMSG'), 'header: foo\n\n#body\n' diff --git a/package.json b/package.json index c529210375..d3e4a9f802 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "publish": "lerna publish --conventional-commits", "reinstall": "yarn clean && yarn install", "start": "yarn watch", - "test": "jest", - "test-ci": "jest --runInBand", + "test": "HOME=$PWD jest", + "test-ci": "HOME=$PWD jest --runInBand", "postinstall": "yarn husky install" }, "commitlint": { @@ -106,4 +106,4 @@ "resolutions": { "**/lodash": "^4.17.19" } -} \ No newline at end of file +}