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 {
4040 */
4141 this . port = port ;
4242
43+ /**
44+ * Nonnull host name or IP address plus port, separated by ':'.
45+ * @type {string }
46+ */
47+ this . hostAndPort = port ? `${ host } :${ port } ` : host ;
48+
4349 /**
4450 * Nonnull object representing parsed query string key-value pairs. Duplicated keys not supported.
4551 * @type {object }
Original file line number Diff line number Diff line change @@ -622,8 +622,10 @@ fdescribe('url', () => {
622622
623623 if ( expectedUrl . port ) {
624624 expect ( url . port ) . toEqual ( expectedUrl . port ) ;
625+ expect ( url . hostAndPort ) . toEqual ( `${ expectedUrl . host } :${ expectedUrl . port } ` ) ;
625626 } else {
626627 expect ( url . port ) . toBeNull ( ) ;
628+ expect ( url . hostAndPort ) . toEqual ( expectedUrl . host ) ;
627629 }
628630
629631 if ( expectedUrl . query ) {
You can’t perform that action at this time.
0 commit comments