33const { resolve } = require ;
44const { spawn } = require ( 'child_process' ) ;
55const Client = require ( '@asset-pipe/client' ) ;
6- const buildServerUri = 'http://127.0.0.1:7203 ' ;
6+ const buildServerUri = 'http://127.0.0.1:8250 ' ;
77const supertest = require ( 'supertest' ) ;
88const request = supertest ( buildServerUri ) ;
99const httpProxy = require ( 'http-proxy' ) ;
@@ -18,7 +18,7 @@ async function startServer(env = 'development') {
1818 server = spawn ( './node_modules/.bin/asset-pipe-server' , [ ] , {
1919 env : Object . assign ( { } , process . env , {
2020 NODE_ENV : env ,
21- PORT : 7203 ,
21+ PORT : 8251 ,
2222 } ) ,
2323 } ) ;
2424 server . stdout . once ( 'data' , ( ) => resolve ( ) ) ;
@@ -35,16 +35,15 @@ async function startProxyServer() {
3535 const random = Math . random ( ) * 1500 + 200 ;
3636 setTimeout ( ( ) => {
3737 proxy . web ( req , res , {
38- target : 'http://127.0.0.1:8200 ' ,
38+ target : 'http://127.0.0.1:8251 ' ,
3939 } ) ;
4040 } , random ) ;
4141 } )
42- . listen ( 8300 , resolve ) ;
42+ . listen ( 8250 , resolve ) ;
4343 } ) ;
4444}
4545
4646beforeAll ( async ( ) => {
47- jest . setTimeout ( 10000 ) ;
4847 await startServer ( ) ;
4948 return startProxyServer ( ) ;
5049} ) ;
@@ -97,7 +96,6 @@ async function layout(label, podlets) {
9796
9897test ( 'Layout and 3 podlets - run 1 - initial' , async ( ) => {
9998 expect . assertions ( 2 ) ;
100- jest . setTimeout ( 20000 ) ;
10199 const podlets = await Promise . all ( [ podlet ( 'a' ) , podlet ( 'b' ) , podlet ( 'c' ) ] ) ;
102100 const { jsFile, cssFile } = await layout ( 'e' , podlets ) ;
103101
@@ -115,7 +113,6 @@ test('Layout and 3 podlets - run 1 - initial', async () => {
115113
116114test ( 'Layout and 3 podlets - run 2 - identical to run 1' , async ( ) => {
117115 expect . assertions ( 2 ) ;
118- jest . setTimeout ( 20000 ) ;
119116 const podlets = await Promise . all ( [ podlet ( 'a' ) , podlet ( 'b' ) , podlet ( 'c' ) ] ) ;
120117 const { jsFile, cssFile } = await layout ( 'e' , podlets ) ;
121118
@@ -133,7 +130,6 @@ test('Layout and 3 podlets - run 2 - identical to run 1', async () => {
133130
134131test ( 'Layout and 3 podlets - run 3 - swapped bundling order' , async ( ) => {
135132 expect . assertions ( 2 ) ;
136- jest . setTimeout ( 20000 ) ;
137133 const podlets = await Promise . all ( [ podlet ( 'b' ) , podlet ( 'c' ) , podlet ( 'a' ) ] ) ;
138134 const { jsFile, cssFile } = await layout ( 'e' , podlets ) ;
139135
@@ -151,7 +147,6 @@ test('Layout and 3 podlets - run 3 - swapped bundling order', async () => {
151147
152148test ( 'Layout and 3 podlets - run 5 - js minification via NODE_ENV=production' , async ( ) => {
153149 expect . assertions ( 1 ) ;
154- jest . setTimeout ( 20000 ) ;
155150
156151 server . kill ( ) ;
157152 await startServer ( 'production' ) ;
@@ -171,7 +166,6 @@ test('Layout and 3 podlets - run 5 - js minification via NODE_ENV=production', a
171166
172167test ( 'Layout and 3 podlets - run 6 - minification and all entrypoints run' , async ( ) => {
173168 expect . assertions ( 3 ) ;
174- jest . setTimeout ( 20000 ) ;
175169
176170 server . kill ( ) ;
177171 await startServer ( 'production' ) ;
0 commit comments