File tree Expand file tree Collapse file tree 3 files changed +1427
-2
lines changed
vite-react-microfrontends Expand file tree Collapse file tree 3 files changed +1427
-2
lines changed Original file line number Diff line number Diff line change
1
+ const concurrently = require ( 'concurrently' ) ;
2
+ const commands = {
3
+ startHost : 'yarn serve:host' ,
4
+ startRemote : 'yarn serve:remote' ,
5
+ startE2e : 'yarn e2e:test'
6
+ } ;
7
+
8
+ const { result} = concurrently ( [
9
+ commands . startHost ,
10
+ commands . startRemote ,
11
+ commands . startE2e
12
+ ] , {
13
+ killOthers : [ 'failure' , 'success' ] ,
14
+ } ) ;
15
+
16
+ function handleClose ( exitInfo ) {
17
+ const testResult = exitInfo . find ( info => info . command . command === commands . startE2e ) ;
18
+ process . exit ( testResult . exitCode ) ;
19
+ }
20
+
21
+ result . then ( handleClose , handleClose ) ;
Original file line number Diff line number Diff line change 17
17
"build:remote" : " npm --prefix ./remote run build" ,
18
18
"preview:host" : " npm --prefix ./host run preview" ,
19
19
"preview:remote" : " npm --prefix ./remote run preview" ,
20
- "e2e:ci" : " yarn preview:remote & yarn preview:host & wait-on http-get://localhost:4174/ && npx cypress run --config-file ../cypress/config/cypress.config.ts --config '{\" supportFile\" : \" ../cypress/support/e2e.ts\" }' --spec \" ./e2e/tests/runAll*.cy.ts\" --browser=chrome"
20
+ "e2e:test" : " npx cypress run --config-file ../cypress/config/cypress.config.ts --config '{\" supportFile\" : \" ../cypress/support/e2e.ts\" }' --spec \" ./e2e/tests/runAll*.cy.ts\" --browser=chrome" ,
21
+ "e2e:ci" : " node e2e.ci.js"
21
22
},
22
23
"author" : {
23
24
"name" : " Giorgio Boa" ,
26
27
},
27
28
"license" : " ISC" ,
28
29
"devDependencies" : {
30
+ "concurrently" : " 7.3.0" ,
29
31
"wait-on" : " 7.0.1"
30
32
}
31
33
}
You can’t perform that action at this time.
0 commit comments