File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,19 @@ const portfinder = require('portfinder')
7
7
portfinder . basePort = 9515
8
8
const serve = ( project , notifyUpdate ) =>
9
9
new Promise ( ( resolve , reject ) => {
10
- const child = project . run ( 'vue-cli-service serve:electron' )
10
+ // --debug to prevent Electron from being launched
11
+ const child = project . run ( 'vue-cli-service serve:electron --debug' )
11
12
let log = ''
12
13
child . stdout . on ( 'data' , async data => {
13
14
data = data . toString ( )
14
15
log += data
15
16
try {
16
- if ( data . match ( / L a u n c h i n g E l e c t r o n \. \. \. / ) ) {
17
+ if (
18
+ data . match (
19
+ // Dev server is finished and background.js is created
20
+ / N o t l a u n c h i n g e l e c t r o n a s d e b u g a r g u m e n t w a s p a s s e d \. Y o u m u s t l a u n c h e l e c t r o n t h o u g h y o u r d e b u g g e r \. /
21
+ )
22
+ ) {
17
23
resolve ( {
18
24
stdout : log ,
19
25
stopServe : ( ) => {
@@ -37,8 +43,6 @@ const runTests = useTS =>
37
43
const { project, projectName } = await create ( 'serve' , useTS )
38
44
const projectPath = p =>
39
45
path . join ( process . cwd ( ) , '__tests__/projects/' + projectName , p )
40
- // Prevent electron from being launched
41
- jest . mock ( 'execa' )
42
46
// Wait for dev server to start
43
47
const { stopServe } = await serve ( project )
44
48
expect ( project . has ( 'dist_electron/background.js' ) ) . toBe ( true )
You can’t perform that action at this time.
0 commit comments