Skip to content

Commit 6a989ff

Browse files
committed
test(cli): update 'should print config' test for add 'prompt' field
1 parent 56a4d8b commit 6a989ff

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

@commitlint/cli/src/cli.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import path from 'path';
21
import {fix, git} from '@commitlint/test';
32
import execa from 'execa';
4-
import merge from 'lodash/merge';
53
import fs from 'fs-extra';
4+
import merge from 'lodash/merge';
5+
import path from 'path';
66

77
const bin = require.resolve('../cli.js');
88

@@ -494,7 +494,8 @@ test('should print config', async () => {
494494
defaultIgnores: undefined,
495495
plugins: {},
496496
rules: { 'type-enum': [ 2, 'never', [ 'foo' ] ] },
497-
helpUrl: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
497+
helpUrl: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
498+
prompt: {}
498499
}"
499500
`);
500501
});

@commitlint/cz-commitlint/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@
3333
"peerDependencies": {
3434
"commitizen": "^4.0.3",
3535
"inquirer": "^8.0.0"
36+
},
37+
"devDependencies": {
38+
"@types/inquirer": "^7.3.1"
3639
}
3740
}

yarn.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,14 @@
22402240
dependencies:
22412241
"@types/node" "*"
22422242

2243+
"@types/inquirer@^7.3.1":
2244+
version "7.3.1"
2245+
resolved "https://registry.npm.taobao.org/@types/inquirer/download/@types/inquirer-7.3.1.tgz#1f231224e7df11ccfaf4cf9acbcc3b935fea292d"
2246+
integrity sha1-HyMSJOffEcz69M+ay8w7k1/qKS0=
2247+
dependencies:
2248+
"@types/through" "*"
2249+
rxjs "^6.4.0"
2250+
22432251
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
22442252
version "2.0.1"
22452253
resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"
@@ -2332,6 +2340,13 @@
23322340
resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"
23332341
integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==
23342342

2343+
"@types/through@*":
2344+
version "0.0.30"
2345+
resolved "https://registry.npm.taobao.org/@types/through/download/@types/through-0.0.30.tgz?cache=0&sync_timestamp=1613384648567&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fthrough%2Fdownload%2F%40types%2Fthrough-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895"
2346+
integrity sha1-4OQs536Je9aurW9upirrE1uKOJU=
2347+
dependencies:
2348+
"@types/node" "*"
2349+
23352350
"@types/tmp@^0.2.0":
23362351
version "0.2.0"
23372352
resolved "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.0.tgz#e3f52b4d7397eaa9193592ef3fdd44dc0af4298c"

0 commit comments

Comments
 (0)