File tree Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ function parseQuery (query: string): Dictionary<string> {
55
55
}
56
56
57
57
export function stringifyQuery (obj: Dictionary< string > ): string {
58
- const res = obj ? Object . keys ( obj ) . sort ( ) . map ( key => {
58
+ const res = obj ? Object . keys ( obj ) . map ( key => {
59
59
const val = obj [ key ]
60
60
61
61
if ( val === undefined ) {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module.exports = {
14
14
. assert . attributeContains ( 'li:nth-child(6) a' , 'href' , '/active-links/users/evan#foo' )
15
15
. assert . attributeContains ( 'li:nth-child(7) a' , 'href' , '/active-links/users/evan?foo=bar' )
16
16
. assert . attributeContains ( 'li:nth-child(8) a' , 'href' , '/active-links/users/evan?foo=bar' )
17
- . assert . attributeContains ( 'li:nth-child(9) a' , 'href' , '/active-links/users/evan?baz=qux& foo=bar' )
17
+ . assert . attributeContains ( 'li:nth-child(9) a' , 'href' , '/active-links/users/evan?foo=bar&baz=qux ' )
18
18
. assert . attributeContains ( 'li:nth-child(10) a' , 'href' , '/active-links/about' )
19
19
. assert . attributeContains ( 'li:nth-child(11) a' , 'href' , '/active-links/about' )
20
20
. assert . containsText ( '.view' , 'Home' )
Original file line number Diff line number Diff line change @@ -10,14 +10,4 @@ describe('Query utils', () => {
10
10
} ) )
11
11
} )
12
12
} )
13
-
14
- describe ( 'stringifyQuery' , ( ) => {
15
- it ( 'should work' , ( ) => {
16
- expect ( stringifyQuery ( {
17
- foo : 'bar' ,
18
- baz : 'qux' ,
19
- arr : [ 1 , 2 ]
20
- } ) ) . toBe ( '?arr=1&arr=2&baz=qux&foo=bar' ) // sorted alphabetically
21
- } )
22
- } )
23
13
} )
You can’t perform that action at this time.
0 commit comments