File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ const webpack = require('webpack');
6
6
const sockjs = require ( 'sockjs/lib/transport' ) ;
7
7
const portfinder = require ( 'portfinder' ) ;
8
8
const getFreePort = require ( '../../lib/Server' ) . getFreePort ;
9
+ // TODO(@anshumanv) - Remove this test in next major
10
+ const findPort = require ( '../../lib/utils/findPort' ) ;
9
11
const Server = require ( '../../lib/Server' ) ;
10
12
const config = require ( '../fixtures/simple-config/webpack.config' ) ;
11
13
const port = require ( '../ports-map' ) . Server ;
@@ -503,5 +505,13 @@ describe('Server', () => {
503
505
spy . mockRestore ( ) ;
504
506
} ) ;
505
507
} ) ;
508
+
509
+ it ( 'should work with findPort util' , ( ) => {
510
+ process . env . DEFAULT_PORT_RETRY = 5 ;
511
+
512
+ return findPort ( 8082 ) . then ( ( port ) => {
513
+ expect ( port ) . toEqual ( 8082 ) ;
514
+ } ) ;
515
+ } ) ;
506
516
} ) ;
507
517
} ) ;
You can’t perform that action at this time.
0 commit comments