Skip to content

Commit

Permalink
Add tests for twitter filters
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed May 19, 2016
1 parent 7d5deea commit e4efa45
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,8 @@ test('.parse() should pass args to .addFilter()', t => {
test('.parse() should run url filter on url', t => {
t.is(AtHash('http://url.com').parse(), '<a target="_blank" href="http://url.com">http://url.com</a>');
});

test('.parse(\'twitter\') should run twitter filters on url', t => {
t.is(AtHash('#hashtag').parse('twitter'), '<a target="_blank" href="https://twitter.com/hashtag/hashtag">#hashtag</a>');
t.is(AtHash('@mention').parse('twitter'), '<a target="_blank" href="https://twitter.com/mention">@mention</a>');
});

0 comments on commit e4efa45

Please sign in to comment.