File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ describe('should determine the correct port', () => {
8989 expect ( await determinePort ( '3999' ) ) . toBe ( 3999 ) ;
9090 } ) ;
9191
92- it ( 'should use $PORT in the abscence of --port' , async ( ) => {
92+ it ( 'should use $PORT in the absence of --port' , async ( ) => {
9393 process . env . PORT = '4001' ;
9494 expect ( await determinePort ( ) ) . toBe ( 4001 ) ;
9595 } ) ;
@@ -105,14 +105,10 @@ describe('should determine the correct port', () => {
105105 } ) ;
106106
107107 it ( 'should return an error if requested --port is taken' , async ( ) => {
108- await Promise . all ( [ determinePort ( 4003 ) , determinePort ( 4003 ) ] ) . catch (
109- error => {
110- expect ( error . message ) . toMatch (
111- new RegExp (
112- / ^ A n o t h e r p r o c e s s i s a l r e a d y r u n n i n g o n p o r t 4 0 0 3 . P l e a s e c h o o s e a d i f f e r e n t p o r t ./ g
113- )
114- ) ;
115- }
108+ expect (
109+ Promise . all ( [ determinePort ( 4003 ) , determinePort ( 4003 ) ] )
110+ ) . rejects . toThrow (
111+ 'Another process is already running on port 4003. Please choose a different port.'
116112 ) ;
117113 } ) ;
118114
You can’t perform that action at this time.
0 commit comments