File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const args = process.argv;
88const  fileName  =  args [ 2 ] ; 
99const  language  =  args [ 3 ]  as  SupportedLanguages  ||  SupportedLanguages . javascript ; 
1010const  report  =  args [ 4 ] ; 
11+ const  reportOutput  =  args [ 5 ] ; 
1112
1213if  ( ! fileName )  { 
1314  console . error ( '[SMELLY] please provide a test file' ) ; 
@@ -45,7 +46,7 @@ async function execute() {
4546        aggregator . push ( {  fileName : file ,  smells,  language } ) ; 
4647      } 
4748
48-       const  to  =  path . resolve ( ` ${ __dirname } /../..` ) ; 
49+       const  to  =  path . resolve ( reportOutput ) ; 
4950      const  report  =  new  SmellsAggreagtor ( aggregator ,  {  to } ) ; 
5051      report . build ( ) ; 
5152
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const execPromise = promisify(exec);
77describe ( 'cli' ,  ( )  =>  { 
88
99  it ( 'find no smells for a given path' ,  async  ( )  =>  { 
10-     const  {  stdout }  =  await  execPromise ( `npm run cli -- fake-data/no-smells/ javascript --report=html` ) ; 
10+     const  {  stdout }  =  await  execPromise ( `npm run cli -- fake-data/no-smells/ javascript --report=html --report-output=$(pwd) ` ) ; 
1111
1212    assert . equal ( true ,  stdout . includes ( "Report HTML generated" ) ) ; 
1313  } ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments