@@ -2,7 +2,7 @@ const fixtureSetup = require('../fixtures/app-test-setup.js')
2
2
const { resolve } = require ( 'path' )
3
3
const { existsSync, readFileSync, writeFileSync } = require ( 'fs' )
4
4
const { move } = require ( 'fs-extra' )
5
- const cli = require ( '~/index .js' )
5
+ const cli = require ( '~/main .js' )
6
6
7
7
const currentDirName = __dirname
8
8
@@ -23,7 +23,11 @@ describe('[CLI] cli.js template', () => {
23
23
await move ( outPath , cacheOutPath )
24
24
}
25
25
26
- cli . run ( [ 'init' , '--directory' , process . cwd ( ) , '--force' , '--tauri-path' , resolve ( currentDirName , '../../../../../..' ) , '--ci' ] )
26
+ await cli . run ( [ 'init' , '--directory' , process . cwd ( ) , '--force' , '--tauri-path' , resolve ( currentDirName , '../../../../../..' ) , '--ci' ] )
27
+ . catch ( err => {
28
+ console . error ( err )
29
+ throw err
30
+ } )
27
31
28
32
if ( outExists ) {
29
33
await move ( cacheOutPath , outPath )
@@ -35,7 +39,10 @@ describe('[CLI] cli.js template', () => {
35
39
const manifestFile = readFileSync ( manifestPath ) . toString ( )
36
40
writeFileSync ( manifestPath , `workspace = { }\n${ manifestFile } ` )
37
41
38
- cli . run ( [ 'build' , '--verbose' ] )
42
+ await cli . run ( [ 'build' , '--verbose' ] ) . catch ( err => {
43
+ console . error ( err )
44
+ throw err
45
+ } )
39
46
process . chdir ( cwd )
40
47
} )
41
48
} )
0 commit comments