Skip to content

Commit 0545208

Browse files
committed
test: add body leading empty newline test
1 parent 10ef0e2 commit 0545208

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/prompts/body-maker.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ describe('body-maker', () => {
2929

3030
expect(result).toBe(expected);
3131
});
32+
33+
it('should prepend body with and leading empty line', () => {
34+
const rules: Rules = {
35+
'body-leading-blank': [Level.Error, 'always', undefined],
36+
'body-max-line-length': [Level.Error, 'never', Infinity]
37+
};
38+
const userTypedBody = 'my message should be prepended with an empty new line';
39+
40+
const result = filterFactory(rules)(userTypedBody);
41+
42+
expect(result).toBe('\nmy message should be prepended with an empty new line');
43+
});
3244
});
3345

3446
describe('transformerFactory', () => {

0 commit comments

Comments
 (0)