Skip to content

Commit

Permalink
feat: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc committed Apr 12, 2017
1 parent 711add4 commit 46d3387
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ describe('url join', function () {
.should.eql('http://www.google.com/foo/bar?test=123');
});

it('should not remove extra slashes in an encoded URL', function () {
urljoin('http:', 'www.google.com///', 'foo/bar', '?url=http%3A//Ftest.com')
.should.eql('http://www.google.com/foo/bar?url=http%3A//Ftest.com');
});

it('should support anchors in urls', function () {
urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123', '#faaaaa')
.should.eql('http://www.google.com/foo/bar?test=123#faaaaa');
Expand Down

0 comments on commit 46d3387

Please sign in to comment.