@@ -51,8 +51,13 @@ describe('CLI collect', () => {
5151
5252 it ( 'should run ESLint plugin and create report.json' , async ( ) => {
5353 const { code, stderr } = await executeProcess ( {
54- command : 'code-pushup' ,
55- args : [ 'collect' , '--no-progress' , '--onlyPlugins=eslint' ] ,
54+ command : 'npx' ,
55+ args : [
56+ '@code-pushup/cli' ,
57+ 'collect' ,
58+ '--no-progress' ,
59+ '--onlyPlugins=eslint' ,
60+ ] ,
5661 cwd : 'examples/react-todos-app' ,
5762 } ) ;
5863
@@ -83,14 +88,16 @@ describe('CLI collect', () => {
8388 ) ;
8489
8590 const { code, stderr } = await executeProcess ( {
86- command : 'code-pushup ' ,
91+ command : 'npx ' ,
8792 args : [
93+ '@code-pushup/cli' ,
8894 'collect' ,
8995 '--no-progress' ,
9096 `--config=${ configPath } ` ,
9197 '--persist.outputDir=tmp/e2e' ,
9298 '--onlyPlugins=coverage' ,
9399 ] ,
100+ cwd : 'examples/react-todos-app' ,
94101 } ) ;
95102
96103 expect ( code ) . toBe ( 0 ) ;
@@ -104,8 +111,13 @@ describe('CLI collect', () => {
104111
105112 it ( 'should run Code coverage plugin that runs coverage tool and creates report.json' , async ( ) => {
106113 const { code, stderr } = await executeProcess ( {
107- command : 'code-pushup' ,
108- args : [ 'collect' , '--no-progress' , '--onlyPlugins=coverage' ] ,
114+ command : 'npx' ,
115+ args : [
116+ '@code-pushup/cli' ,
117+ 'collect' ,
118+ '--no-progress' ,
119+ '--onlyPlugins=coverage' ,
120+ ] ,
109121 cwd : 'examples/react-todos-app' ,
110122 } ) ;
111123
@@ -120,8 +132,13 @@ describe('CLI collect', () => {
120132
121133 it ( 'should create report.md' , async ( ) => {
122134 const { code, stderr } = await executeProcess ( {
123- command : 'code-pushup' ,
124- args : [ 'collect' , '--persist.format=md' , '--no-progress' ] ,
135+ command : 'npx' ,
136+ args : [
137+ '@code-pushup/cli' ,
138+ 'collect' ,
139+ '--persist.format=md' ,
140+ '--no-progress' ,
141+ ] ,
125142 cwd : 'examples/react-todos-app' ,
126143 } ) ;
127144
@@ -137,8 +154,8 @@ describe('CLI collect', () => {
137154
138155 it ( 'should print report summary to stdout' , async ( ) => {
139156 const { code, stdout, stderr } = await executeProcess ( {
140- command : 'code-pushup ' ,
141- args : [ 'collect' , '--no-progress' ] ,
157+ command : 'npx ' ,
158+ args : [ '@code-pushup/cli' , ' collect', '--no-progress' ] ,
142159 cwd : 'examples/react-todos-app' ,
143160 } ) ;
144161
0 commit comments