Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit a2827a2

Browse files
committed
maximumLineLength spec: add should report functions within comments
mainly so that we check that maximumLineLenght ever fails to validate with functionSignature (such line was removed in 4f12ed3)
1 parent 4f12ed3 commit a2827a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/specs/rules/maximum-line-length.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ describe('rules/maximum-line-length', function() {
225225
'})();';
226226
expect(checker.checkString(code)).to.have.no.errors();
227227
});
228+
229+
it('should report functions within comments', function() {
230+
var code = '// function myCoolFunction(argument) { }';
231+
expect(checker.checkString(code)).to.have.one.validation.error.from('maximumLineLength');
232+
});
228233
});
229234

230235
describe('allExcept["require"] option', function() {

0 commit comments

Comments
 (0)