File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
packages/engine.io-client/test Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,32 @@ describe("Transport", () => {
116116 expect ( polling . uri ( ) ) . to . contain ( "https://localhost/engine.io?sid=test" ) ;
117117 } ) ;
118118
119+ it ( "should generate an https uri w/o a port (string)" , ( ) => {
120+ const polling = new eio . transports . polling ( {
121+ path : "/engine.io" ,
122+ hostname : "localhost" ,
123+ secure : true ,
124+ query : { sid : "test" } ,
125+ port : "443" ,
126+ timestampRequests : false ,
127+ } ) ;
128+ expect ( polling . uri ( ) ) . to . contain ( "https://localhost/engine.io?sid=test" ) ;
129+ } ) ;
130+
131+ it ( "should generate an https uri with a port" , ( ) => {
132+ const polling = new eio . transports . polling ( {
133+ path : "/engine.io" ,
134+ hostname : "localhost" ,
135+ secure : true ,
136+ query : { sid : "test" } ,
137+ port : 8443 ,
138+ timestampRequests : false ,
139+ } ) ;
140+ expect ( polling . uri ( ) ) . to . contain (
141+ "https://localhost:8443/engine.io?sid=test" ,
142+ ) ;
143+ } ) ;
144+
119145 it ( "should generate a timestamped uri" , ( ) => {
120146 const polling = new eio . transports . polling ( {
121147 path : "/engine.io" ,
You can’t perform that action at this time.
0 commit comments