Skip to content

Commit

Permalink
chore: added an additional testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafConijn committed Jul 13, 2023
1 parent 9f62693 commit 49e08bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test.js
Expand Up @@ -34,6 +34,10 @@ describe('wrap', function () {
assert.equal(wrap(str, {trim: true}), 'A project without documentation is like a project\nthat doesn\'t exist. Verb solves this by making it\ndead simple to generate project documentation,\nusing simple markdown templates, with zero\nconfiguration required.');
});

it('should trim trailing whitespace (even for empty lines):', function () {
assert.equal(wrap("a \n\nb \n \nc\t", {trim: true}), 'a\nb\nc');
});

it('should handle strings with just newlines', function () {
assert.equal(wrap('\r\n', {indent: '\r\n', width: 18}), '\r\n');
});
Expand Down

0 comments on commit 49e08bb

Please sign in to comment.