Skip to content

Commit 8987b09

Browse files
fix: update conventional-changelog-angular unit tests
1 parent a6e8a16 commit 8987b09

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

@commitlint/parse/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export async function parse(
88
parser: Parser = sync,
99
parserOpts?: ParserOptions
1010
): Promise<Commit> {
11-
const defaultOpts = (await defaultChangelogOpts).parserOpts;
11+
const preset = await defaultChangelogOpts();
12+
const defaultOpts = preset.parserOpts;
1213
const opts = {
1314
...defaultOpts,
1415
fieldPattern: null,

@commitlint/rules/src/references-empty.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const messages = {
1212
};
1313

1414
const opts = (async () => {
15-
const o = await preset;
15+
const o = await preset();
1616
o.parserOpts.commentChar = '#';
1717
return o;
1818
})();

@commitlint/rules/src/subject-exclamation-mark.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {subjectExclamationMark} from './subject-exclamation-mark';
44
const preset = require('conventional-changelog-angular');
55

66
const parseMessage = async (str: string) => {
7-
const {parserOpts} = await preset;
7+
const {parserOpts} = await preset();
88
return parse(str, undefined, parserOpts);
99
};
1010

0 commit comments

Comments
 (0)