@@ -148,7 +148,7 @@ describe('executor command', () => {
148148 ) . resolves . not . toThrow ( ) ;
149149 } ) ;
150150
151- it ( 'should execute print-config executor with api key ' , async ( ) => {
151+ it ( 'should execute print-config executor with upload config ' , async ( ) => {
152152 const cwd = path . join ( testFileDir , 'execute-print-config-command' ) ;
153153 await addTargetToWorkspace ( tree , { cwd, project } ) ;
154154
@@ -160,6 +160,9 @@ describe('executor command', () => {
160160 `${ project } :code-pushup` ,
161161 'print-config' ,
162162 '--upload.apiKey=a123a' ,
163+ '--upload.server=https://example.com' ,
164+ '--upload.organization=test-org' ,
165+ '--upload.project=test-project' ,
163166 ] ,
164167 cwd,
165168 } ) ;
@@ -207,9 +210,15 @@ describe('executor command', () => {
207210 ) ;
208211 expect ( cleanStdout ) . toContain ( 'Code PushUp CLI' ) ;
209212
210- await expect (
211- readJsonFile ( path . join ( cwd , '.reports' , 'terminal-report.json' ) ) ,
212- ) . resolves . not . toThrow ( ) ;
213+ // Check for report in project root's .reports directory
214+ const reportPath = path . join (
215+ cwd ,
216+ 'libs' ,
217+ project ,
218+ '.reports' ,
219+ 'terminal-report.json' ,
220+ ) ;
221+ await expect ( readJsonFile ( reportPath ) ) . resolves . not . toThrow ( ) ;
213222 } ) ;
214223
215224 it ( 'should execute collect executor and add report to sub folder named by project' , async ( ) => {
@@ -226,8 +235,9 @@ describe('executor command', () => {
226235 const cleanStdout = removeColorCodes ( stdout ) ;
227236 expect ( cleanStdout ) . toContain ( 'nx run my-lib:code-pushup collect' ) ;
228237
238+ // Check for report in project root's .code-pushup directory
229239 const report = await readJsonFile (
230- path . join ( cwd , '.code-pushup' , project , 'report.json' ) ,
240+ path . join ( cwd , 'libs' , project , ' .code-pushup', 'report.json' ) ,
231241 ) ;
232242 expect ( report ) . toStrictEqual (
233243 expect . objectContaining ( {
0 commit comments