File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -26,24 +26,30 @@ function startProxy(port) {
2626}
2727
2828describe ( 'Client code' , ( ) => {
29- let proxy ;
3029 let server ;
3130
3231 beforeAll ( ( done ) => {
3332 server = runDevServer ( '--host 0.0.0.0 --port 8080' , configPath ) ;
34- proxy = startProxy ( 9090 ) ;
3533 setTimeout ( done , 5000 ) ;
3634 } ) ;
3735
38- afterAll ( ( done ) => {
39- proxy . close ( ) ;
36+ afterAll ( ( ) => {
4037 server . close ( ) ;
41- done ( ) ;
4238 } ) ;
4339
4440 describe ( 'behind a proxy' , ( ) => {
41+ let proxy ;
42+
4543 jest . setTimeout ( 20000 ) ;
4644
45+ beforeAll ( ( ) => {
46+ proxy = startProxy ( 9090 ) ;
47+ } ) ;
48+
49+ afterAll ( ( ) => {
50+ proxy . close ( ) ;
51+ } ) ;
52+
4753 it ( 'responds with a 200' , ( done ) => {
4854 const req = request ( 'http://localhost:9090' ) ;
4955 req . get ( '/sockjs-node' ) . expect ( 200 , 'Welcome to SockJS!\n' , done ) ;
You can’t perform that action at this time.
0 commit comments