File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
packages/nx-plugin/src/executors/cli Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,29 @@ describe('runAutorunExecutor', () => {
109109 it ( 'should set env var information if verbose is set' , async ( ) => {
110110 const output = await runAutorunExecutor (
111111 {
112- dryRun : true , // here to produce log
112+ verbose : true ,
113+ } ,
114+ { ...executorContext ( 'github-action' ) , cwd : '<CWD>' } ,
115+ ) ;
116+
117+ expect ( executeProcessSpy ) . toHaveBeenCalledTimes ( 1 ) ;
118+ expect ( executeProcessSpy ) . toHaveBeenCalledWith ( {
119+ command : 'npx' ,
120+ args : expect . arrayContaining ( [ '@code-pushup/cli' ] ) ,
121+ cwd : '<CWD>' ,
122+ env : expect . objectContaining ( {
123+ CP_VERBOSE : 'true' ,
124+ } ) ,
125+ } ) ;
126+
127+ expect ( output . command ) . not . toContain ( '--verbose' ) ;
128+ expect ( loggerSpy . warn ) . toHaveBeenCalledTimes ( 0 ) ;
129+ } ) ;
130+
131+ it ( 'should log env var in dryRun information if verbose is set' , async ( ) => {
132+ const output = await runAutorunExecutor (
133+ {
134+ dryRun : true ,
113135 verbose : true ,
114136 } ,
115137 { ...executorContext ( 'github-action' ) , cwd : '<CWD>' } ,
You can’t perform that action at this time.
0 commit comments