Skip to content

Commit

Permalink
Add test assertions for preserveTrailingDash
Browse files Browse the repository at this point in the history
  • Loading branch information
vhpoet committed Apr 21, 2021
1 parent 10c0c0d commit c0b0ef7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test.js
Expand Up @@ -136,6 +136,9 @@ test('leading underscore', t => {
test('trailing dash', t => {
t.is(slugify('foo bar-', {preserveTrailingDash: true}), 'foo-bar-');
t.is(slugify('foo-bar--', {preserveTrailingDash: true}), 'foo-bar-');
t.is(slugify('foo-bar -', {preserveTrailingDash: true}), 'foo-bar-');
t.is(slugify('foo-bar - ', {preserveTrailingDash: true}), 'foo-bar');
t.is(slugify('foo-bar ', {preserveTrailingDash: true}), 'foo-bar');
});

test('counter', t => {
Expand Down

0 comments on commit c0b0ef7

Please sign in to comment.