File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ class Url {
40
40
*/
41
41
this . port = port ;
42
42
43
+ /**
44
+ * Nonnull host name or IP address plus port, separated by ':'.
45
+ * @type {string }
46
+ */
47
+ this . hostAndPort = port ? `${ host } :${ port } ` : host ;
48
+
43
49
/**
44
50
* Nonnull object representing parsed query string key-value pairs. Duplicated keys not supported.
45
51
* @type {object }
Original file line number Diff line number Diff line change @@ -622,8 +622,10 @@ fdescribe('url', () => {
622
622
623
623
if ( expectedUrl . port ) {
624
624
expect ( url . port ) . toEqual ( expectedUrl . port ) ;
625
+ expect ( url . hostAndPort ) . toEqual ( `${ expectedUrl . host } :${ expectedUrl . port } ` ) ;
625
626
} else {
626
627
expect ( url . port ) . toBeNull ( ) ;
628
+ expect ( url . hostAndPort ) . toEqual ( expectedUrl . host ) ;
627
629
}
628
630
629
631
if ( expectedUrl . query ) {
You can’t perform that action at this time.
0 commit comments