@@ -2,12 +2,21 @@ import { parseURL } from "./parseURL";
2
2
3
3
describe ( parseURL . name , ( ) => {
4
4
it . each ( [
5
- [ "https://example.com" , { scheme : "https" , authority : "example.com" , path : "/" , isIp : false } ] ,
6
- [ "http://example.com:80/foo/bar" , { scheme : "http" , authority : "example.com:80" , path : "/foo/bar" , isIp : false } ] ,
7
- [ "https://127.0.0.1" , { scheme : "https" , authority : "127.0.0.1" , path : "/" , isIp : true } ] ,
8
- [ "https://127.0.0.1:8443" , { scheme : "https" , authority : "127.0.0.1:8443" , path : "/" , isIp : true } ] ,
9
- [ "https://[fe80::1]" , { scheme : "https" , authority : "[fe80::1]" , path : "/" , isIp : true } ] ,
10
- [ "https://[fe80::1]:8443" , { scheme : "https" , authority : "[fe80::1]:8443" , path : "/" , isIp : true } ] ,
5
+ [ "https://example.com" , { scheme : "https" , authority : "example.com" , path : "/" , normalizedPath : "/" , isIp : false } ] ,
6
+ [
7
+ "http://example.com:80/foo/bar" ,
8
+ { scheme : "http" , authority : "example.com:80" , path : "/foo/bar" , normalizedPath : "/foo/bar/" , isIp : false } ,
9
+ ] ,
10
+ [ "https://127.0.0.1" , { scheme : "https" , authority : "127.0.0.1" , path : "/" , normalizedPath : "/" , isIp : true } ] ,
11
+ [
12
+ "https://127.0.0.1:8443" ,
13
+ { scheme : "https" , authority : "127.0.0.1:8443" , path : "/" , normalizedPath : "/" , isIp : true } ,
14
+ ] ,
15
+ [ "https://[fe80::1]" , { scheme : "https" , authority : "[fe80::1]" , path : "/" , normalizedPath : "/" , isIp : true } ] ,
16
+ [
17
+ "https://[fe80::1]:8443" ,
18
+ { scheme : "https" , authority : "[fe80::1]:8443" , path : "/" , normalizedPath : "/" , isIp : true } ,
19
+ ] ,
11
20
] ) ( "test '%s'" , ( input , output ) => {
12
21
expect ( parseURL ( input ) ) . toEqual ( output ) ;
13
22
} ) ;
0 commit comments