Skip to content

Commit

Permalink
WIP1
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Jan 21, 2024
1 parent e3d2091 commit 84aeb6c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions @commitlint/rules/src/subject-full-stop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const messages = {
standardScopeWith: `type(scope): subject.\n`,
nonStandardScopeWith: 'type.scope: subject.\n',
ellipsisMessage: 'test: subject ends with ellipsis...',
superShortMsg: 'ok',
};

const parsed = {
Expand All @@ -17,6 +18,7 @@ const parsed = {
standardScopeWith: parse(messages.standardScopeWith),
nonStandardScopeWith: parse(messages.nonStandardScopeWith),
ellipsisMessage: parse(messages.ellipsisMessage),
superShortMsg: parse(messages.superShortMsg),
};

test('empty against "always" should succeed', async () => {
Expand Down Expand Up @@ -80,3 +82,10 @@ test('ellipsis is not fullstop so commit title ending with it against "never ."
const expected = true;
expect(actual).toEqual(expected);
});

test('super short title still works', async () => {
const [actual] = subjectFullStop(await parsed.superShortMsg, 'never', '.');
const expected = true;
expect(actual).toEqual(expected);
});

0 comments on commit 84aeb6c

Please sign in to comment.