Skip to content

Commit 5004df9

Browse files
test: add case for long co-author line
1 parent f778e67 commit 5004df9

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/rules/line-length.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,36 @@ https://${'very-'.repeat(80)}-long-url.org/
129129
tt.end()
130130
})
131131

132+
t.test('Co-author lines', (tt) => {
133+
const v = new Validator()
134+
const context = new Commit({
135+
sha: 'f1496de5a7d5474e39eafaafe6f79befe5883a5b',
136+
author: {
137+
name: 'Jacob Smith',
138+
139+
date: '2025-12-22T09:40:42Z',
140+
},
141+
message: `
142+
fixup!: apply case-insensitive suggestion
143+
Co-authored-by: Michaël Zasso <[email protected]>
144+
`,
145+
}, v)
146+
147+
148+
context.report = (opts) => {
149+
tt.pass('called report')
150+
tt.equal(opts.id, 'line-length', 'id')
151+
tt.equal(opts.string, '', 'string')
152+
tt.equal(opts.level, 'pass', 'level')
153+
}
154+
155+
Rule.validate(context, {
156+
options: {
157+
length: 72
158+
}
159+
})
160+
tt.end()
161+
})
162+
132163
t.end()
133164
})

0 commit comments

Comments
 (0)