@@ -20,16 +20,10 @@ describe('create-cli-inti', () => {
2020
2121 it ( 'should execute package correctly over npm exec' , async ( ) => {
2222 const cwd = join ( testFileDir , 'npm-exec' ) ;
23- const userconfig = relative ( cwd , join ( workspaceRoot , '.npmrc' ) ) ;
2423 await createNpmWorkspace ( cwd ) ;
2524 const { code, stdout } = await executeProcess ( {
2625 command : 'npm' ,
27- args : [
28- 'exec' ,
29- '@code-pushup/create-cli' ,
30- `--userconfig=${ userconfig } ` ,
31- `--prefix=${ dirname ( userconfig ) } ` ,
32- ] ,
26+ args : [ 'exec' , '@code-pushup/create-cli' ] ,
3327 cwd,
3428 } ) ;
3529
@@ -60,18 +54,11 @@ describe('create-cli-inti', () => {
6054
6155 it ( 'should execute package correctly over npm init' , async ( ) => {
6256 const cwd = join ( testFileDir , 'npm-init' ) ;
63- const userconfig = relative ( cwd , join ( workspaceRoot , '.npmrc' ) ) ;
64-
6557 await createNpmWorkspace ( cwd ) ;
6658
6759 const { code, stdout } = await executeProcess ( {
6860 command : 'npm' ,
69- args : [
70- 'init' ,
71- '@code-pushup/cli' ,
72- `--userconfig=${ userconfig } ` ,
73- `--prefix=${ dirname ( userconfig ) } ` ,
74- ] ,
61+ args : [ 'init' , '@code-pushup/cli' ] ,
7562 cwd,
7663 } ) ;
7764
@@ -102,25 +89,18 @@ describe('create-cli-inti', () => {
10289
10390 it ( 'should produce an executable setup when running npm init' , async ( ) => {
10491 const cwd = join ( testFileDir , 'npm-init-executable' ) ;
105- const userconfig = relative ( cwd , join ( workspaceRoot , '.npmrc' ) ) ;
106-
10792 await createNpmWorkspace ( cwd ) ;
10893
10994 await executeProcess ( {
11095 command : 'npm' ,
111- args : [
112- 'init' ,
113- '@code-pushup/cli' ,
114- `--userconfig=${ userconfig } ` ,
115- `--prefix=${ dirname ( userconfig ) } ` ,
116- ] ,
96+ args : [ 'init' , '@code-pushup/cli' ] ,
11797 cwd,
11898 } ) ;
11999
120100 await expect (
121101 executeProcess ( {
122102 command : 'npx' ,
123- args : [ '@code-pushup/cli print-config' , `--userconfig= ${ userconfig } ` ] ,
103+ args : [ '@code-pushup/cli print-config' ] ,
124104 cwd,
125105 } ) ,
126106 )
0 commit comments