File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2423,4 +2423,22 @@ describe('server', function () {
2423
2423
testForHeaders ( headers , done ) ;
2424
2424
} ) ;
2425
2425
} ) ;
2426
+
2427
+ describe ( 'wsEngine option' , function ( ) {
2428
+ it ( 'should allow loading of other websocket server implementation like uws' , function ( done ) {
2429
+ var engine = listen ( { allowUpgrades : false , wsEngine : 'uws' } , function ( port ) {
2430
+ expect ( engine . ws instanceof require ( 'uws' ) . Server ) . to . be . ok ( ) ;
2431
+ var socket = new eioc . Socket ( 'ws://localhost:%d' . s ( port ) ) ;
2432
+ engine . on ( 'connection' , function ( conn ) {
2433
+ conn . send ( 'a' ) ;
2434
+ } ) ;
2435
+ socket . on ( 'open' , function ( ) {
2436
+ socket . on ( 'message' , function ( msg ) {
2437
+ expect ( msg ) . to . be ( 'a' ) ;
2438
+ done ( ) ;
2439
+ } ) ;
2440
+ } ) ;
2441
+ } ) ;
2442
+ } ) ;
2443
+ } ) ;
2426
2444
} ) ;
You can’t perform that action at this time.
0 commit comments