-
-
Save gajus/742df5cf1ab10bff744f87ff6c7df02b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test('extends base URL using second URL fragment just like browser would', (t) => { | |
t.is(resolveUrl('http://foo.com', '/bar'), 'http://foo.com/bar'); | |
t.is(resolveUrl('http://foo.com/bar', './baz'), 'http://foo.com/bar/baz'); | |
t.is(resolveUrl('http://foo.com/bar', '/baz'), 'http://foo.com/baz'); | |
t.is(resolveUrl('http://foo.com/bar/baz', '../qux'), 'http://foo.com/bar/qux'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment