Skip to content

Commit

Permalink
add tests for flavoured slugs
Browse files Browse the repository at this point in the history
appendix #16
  • Loading branch information
dodo committed Sep 22, 2014
1 parent 2eac3e9 commit cbfa8f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/slug.test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,9 @@ describe 'slug', ->

it 'should replace multichars', ->
[slug "w/ <3 && sugar || ☠"].should.eql ['with-love-and-sugar-or-skull-and-bones']

it 'should be flavourable', ->
remove = /[.'"]/g
text = "It's your journey ... we guide you through."
expected = "Its-your-journey-we-guide-you-through"
[slug(text, {remove})].should.eql [expected]

0 comments on commit cbfa8f6

Please sign in to comment.