-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(buildQuery): support params without key
- Loading branch information
1 parent
fa46615
commit 7168049
Showing
2 changed files
with
7 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1321,6 +1321,9 @@ | |
|
||
u.query('?&foo=bar&foo=bar').normalizeQuery(); | ||
equal(u.query(), 'foo=bar', 'duplicate key=value resolution'); | ||
|
||
u.query('?=bar').normalizeQuery(); | ||
equal(u.query(), '=bar', 'query without key'); | ||
}); | ||
test('normalizeFragment', function() { | ||
var u = new URI('http://example.org/foobar.html#'); | ||
|
@@ -1330,6 +1333,9 @@ | |
test('readable', function() { | ||
var u = new URI('http://foo:[email protected]/hello%20world/ä.html?foo%5B%5D=b+är#fragment'); | ||
equal(u.readable(), 'http://www.exämple.org/hello world/ä.html?foo[]=b är#fragment', 'readable URL'); | ||
|
||
var u = new URI('http://example.org/?=5640'); | ||
equal(u.readable(), 'http://example.org/?=5640', 'readable URL: query without key'); | ||
}); | ||
|
||
module('resolving URLs'); | ||
|