File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,11 @@ class TestingBot {
2222  _loadConfig  ( )  { 
2323    try  { 
2424      const  tbFile  =  path . join ( os . homedir ( ) ,  '.testingbot' ) ; 
25-       if  ( fs . statSync ( tbFile ) . isFile ( )  ===  true )  { 
26-         const  data  =  fs . readFileSync ( tbFile ) ; 
27-         if  ( data  !==  null )  { 
28-           const  arr  =  data . toString ( ) . replace ( '\n' ,  '' ) . split ( ':' ) ; 
29-           this . options . api_key  =  arr [ 0 ] ; 
30-           this . options . api_secret  =  arr [ 1 ] ; 
31-         } 
25+       const  data  =  fs . readFileSync ( tbFile ) ; 
26+       if  ( data  !==  null )  { 
27+         const  arr  =  data . toString ( ) . replace ( '\n' ,  '' ) . split ( ':' ) ; 
28+         this . options . api_key  =  arr [ 0 ] ; 
29+         this . options . api_secret  =  arr [ 1 ] ; 
3230      } 
3331    }  catch  ( e )  { 
3432    } 
Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ describe('TestingBot API Tests', function() {
9595    } ) ; 
9696
9797    it ( 'should update a test with legacy data format' ,  function ( done )  { 
98-       const  that  =  this ; 
9998      this . api . getTests ( ( err ,  response )  =>  { 
10099        assert . ok ( response  &&  response . data  &&  response . data . length  >  0 ,  'Should have test data' ) ; 
101100        const  singleTest  =  response . data [ 0 ] ; 
@@ -113,7 +112,6 @@ describe('TestingBot API Tests', function() {
113112    } ) ; 
114113
115114    it ( 'should update a test with object data format' ,  function ( done )  { 
116-       const  that  =  this ; 
117115      this . api . getTests ( ( err ,  response )  =>  { 
118116        assert . ok ( response  &&  response . data  &&  response . data . length  >  0 ,  'Should have test data' ) ; 
119117        const  singleTest  =  response . data [ 0 ] ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments