Skip to content

Commit

Permalink
test: add test for url with fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed Jun 13, 2024
1 parent 99316fb commit 3deee29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/string.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ st`),
assert.strictEqual(urlJoin('https://example.com'), 'https://example.com');
assert.strictEqual(urlJoin('https://example.com', null, 'world/'), 'https://example.com/world');
assert.strictEqual(urlJoin(null, 'https://example.com', 'world/'), 'https://example.com/world');
assert.strictEqual(
urlJoin('https://example.com', 'hello', '#fragment'),
'https://example.com/hello/#fragment'
);
assert.strictEqual(
urlJoin('https://example.com', 'hello', 'world'),
'https://example.com/hello/world'
Expand Down

0 comments on commit 3deee29

Please sign in to comment.