@@ -27,21 +27,17 @@ async function addTargetToWorkspace(
2727) {
2828 const { cwd, project } = options ;
2929 const projectCfg = readProjectConfiguration ( tree , project ) ;
30- const { root } = projectCfg ;
31- const configPath = path . join ( root , 'code-pushup.config.ts' ) ;
3230 updateProjectConfiguration ( tree , project , {
3331 ...projectCfg ,
3432 targets : {
3533 ...projectCfg . targets ,
3634 'code-pushup' : {
3735 executor : '@code-pushup/nx-plugin:cli' ,
38- options : {
39- config : configPath ,
40- ...executorOptions ,
41- } ,
36+ ...( executorOptions && { options : executorOptions } ) ,
4237 } ,
4338 } ,
4439 } ) ;
40+ const { root } = projectCfg ;
4541 generateCodePushupConfig ( tree , root , {
4642 plugins : [
4743 {
@@ -148,7 +144,7 @@ describe('executor command', () => {
148144 ) . resolves . not . toThrow ( ) ;
149145 } ) ;
150146
151- it ( 'should execute print-config executor with upload config ' , async ( ) => {
147+ it ( 'should execute print-config executor with api key ' , async ( ) => {
152148 const cwd = path . join ( testFileDir , 'execute-print-config-command' ) ;
153149 await addTargetToWorkspace ( tree , { cwd, project } ) ;
154150
@@ -160,9 +156,6 @@ describe('executor command', () => {
160156 `${ project } :code-pushup` ,
161157 'print-config' ,
162158 '--upload.apiKey=a123a' ,
163- '--upload.server=https://example.com' ,
164- '--upload.organization=test-org' ,
165- '--upload.project=test-project' ,
166159 ] ,
167160 cwd,
168161 } ) ;
@@ -233,7 +226,7 @@ describe('executor command', () => {
233226 expect ( cleanStdout ) . toContain ( 'nx run my-lib:code-pushup collect' ) ;
234227
235228 const report = await readJsonFile (
236- path . join ( cwd , 'libs' , project , ' .code-pushup', 'report.json' ) ,
229+ path . join ( cwd , '.code-pushup' , project , 'report.json' ) ,
237230 ) ;
238231 expect ( report ) . toStrictEqual (
239232 expect . objectContaining ( {
0 commit comments