@@ -3,7 +3,7 @@ describe("URLPattern", function () {
3
3
it ( "throws on invalid URLPattern" , function ( ) {
4
4
var exceptionCaught = false ;
5
5
try {
6
- const pattern = new URLPattern ( null ) ;
6
+ const pattern = new URLPattern ( 1 ) ;
7
7
} catch ( e ) {
8
8
exceptionCaught = true ;
9
9
}
@@ -22,7 +22,7 @@ describe("URLPattern", function () {
22
22
23
23
it ( "parses simple pattern" , function ( ) {
24
24
const pattern = new URLPattern ( "https://example.com/books/:id" ) ;
25
- expect ( pattern . protocol ) . toBe ( "https: " ) ;
25
+ expect ( pattern . protocol ) . toBe ( "https" ) ;
26
26
expect ( pattern . hostname ) . toBe ( "example.com" ) ;
27
27
expect ( pattern . pathname ) . toBe ( "/books/:id" ) ;
28
28
expect ( pattern . port ) . toBe ( "" ) ;
@@ -36,13 +36,13 @@ describe("URLPattern", function () {
36
36
37
37
it ( "parses with undefined base" , function ( ) {
38
38
const pattern = new URLPattern ( "https://google.com" , undefined ) ;
39
- expect ( pattern . protocol ) . toBe ( "https: " ) ;
39
+ expect ( pattern . protocol ) . toBe ( "https" ) ;
40
40
expect ( pattern . hostname ) . toBe ( "google.com" ) ;
41
41
} ) ;
42
42
43
43
it ( "parses with null base" , function ( ) {
44
44
const pattern = new URLPattern ( "https://google.com" , null ) ;
45
- expect ( pattern . protocol ) . toBe ( "https: " ) ;
45
+ expect ( pattern . protocol ) . toBe ( "https" ) ;
46
46
expect ( pattern . hostname ) . toBe ( "google.com" ) ;
47
47
} ) ;
48
48
0 commit comments