@@ -18,6 +18,7 @@ const pairs = {
1818 SERVICE_MISSING_PROTO_AND_HOST_FOOBAR_PORT : "8000" ,
1919 EXTERNAL_URL_CLEVER_COM : "https://clever.com:443" ,
2020 EXTERNAL_URL_API_CLEVER_COM : "https://api.clever.com:443" ,
21+ EXTERNAL_URL_DIAGNOSTICS_APP_CLEVER_COM : "https://diagnostics-app.clever.com:443" ,
2122} ;
2223
2324describe ( "discovery" , ( ) => {
@@ -110,6 +111,13 @@ describe("discovery", () => {
110111 assert . equal ( ex_disc . host ( ) , "api.clever.com" ) ;
111112 assert . equal ( ex_disc . host_port ( ) , "api.clever.com:443" ) ;
112113 } ) ;
114+ it ( "test external url with hyphens" , ( ) => {
115+ const ex_disc = external ( "diagnostics-app.clever.com" ) ;
116+ assert . equal ( ex_disc . url ( ) , "https://diagnostics-app.clever.com:443" ) ;
117+ assert . equal ( ex_disc . proto_host ( ) , "https://diagnostics-app.clever.com" ) ;
118+ assert . equal ( ex_disc . host ( ) , "diagnostics-app.clever.com" ) ;
119+ assert . equal ( ex_disc . host_port ( ) , "diagnostics-app.clever.com:443" ) ;
120+ } ) ;
113121 return it ( "test expect error on missing two vars" , ( ) => {
114122 const disc = discovery ( "missing-proto-and-host" , "foobar" ) ;
115123 assert . equal ( disc . port ( ) , "8000" ) ;
0 commit comments