Skip to content

Commit 84aeb6c

Browse files
committed
WIP1
1 parent e3d2091 commit 84aeb6c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

@commitlint/rules/src/subject-full-stop.test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const messages = {
88
standardScopeWith: `type(scope): subject.\n`,
99
nonStandardScopeWith: 'type.scope: subject.\n',
1010
ellipsisMessage: 'test: subject ends with ellipsis...',
11+
superShortMsg: 'ok',
1112
};
1213

1314
const parsed = {
@@ -17,6 +18,7 @@ const parsed = {
1718
standardScopeWith: parse(messages.standardScopeWith),
1819
nonStandardScopeWith: parse(messages.nonStandardScopeWith),
1920
ellipsisMessage: parse(messages.ellipsisMessage),
21+
superShortMsg: parse(messages.superShortMsg),
2022
};
2123

2224
test('empty against "always" should succeed', async () => {
@@ -80,3 +82,10 @@ test('ellipsis is not fullstop so commit title ending with it against "never ."
8082
const expected = true;
8183
expect(actual).toEqual(expected);
8284
});
85+
86+
test('super short title still works', async () => {
87+
const [actual] = subjectFullStop(await parsed.superShortMsg, 'never', '.');
88+
const expected = true;
89+
expect(actual).toEqual(expected);
90+
});
91+

0 commit comments

Comments
 (0)