File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1- import  path  from  'path' ; 
21import  { git }  from  '@commitlint/test' ; 
3- import  test  from  'ava' ; 
42import  execa  from  'execa' ; 
53import  stream  from  'string-to-stream' ; 
64
7- const  bin  =  path . join ( __dirname ,   './cli.js' ) ; 
5+ const  bin  =  require . resolve ( './cli.js' ) ; 
86
97const  cli  =  ( args ,  options )  =>  { 
108	return  ( input  =  '' )  =>  { 
@@ -18,8 +16,9 @@ const cli = (args, options) => {
1816	} ; 
1917} ; 
2018
21- test ( 'should print warning if stage is empty' ,  async  t  =>  { 
19+ test ( 'should print warning if stage is empty' ,  async  ( )  =>  { 
2220	const  cwd  =  await  git . bootstrap ( ) ; 
2321	const  actual  =  await  cli ( [ ] ,  { cwd} ) ( 'foo: bar' ) ; 
24- 	t . true ( actual . stdout . includes ( 'Nothing to commit.' ) ) ; 
22+ 	expect ( actual . stdout ) . toContain ( 'Nothing to commit.' ) ; 
23+ 	expect ( actual . stderr ) . toBe ( '' ) ; 
2524} ) ; 
Original file line number Diff line number Diff line change 1111  "scripts" : {
1212    "commit" : " $npm_package_bin_commit"  ,
1313    "deps" : " dep-check"  ,
14-     "pkg" : " pkg-check --skip-main"  ,
15-     "test" : " ava -c 4 --verbose" 
14+     "pkg" : " pkg-check --skip-main" 
1615  },
1716  "repository" : {
1817    "type" : " git"  ,
3130  "devDependencies" : {
3231    "@commitlint/test" : " 8.2.0"  ,
3332    "@commitlint/utils" : " ^8.3.4"  ,
34-     "ava " : " 2.4.0 " 
33+     "string-to-stream " : " 3.0.1 " 
3534  },
3635  "dependencies" : {
3736    "@commitlint/prompt" : " ^8.3.5"  ,
38-     "execa" : " 0.11.0"  ,
39-     "string-to-stream" : " 3.0.1" 
37+     "execa" : " 0.11.0" 
4038  }
4139}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ module.exports = {
55	testMatch : [ 
66		'**/*.test.ts?(x)' , 
77		'**/@commitlint/read/src/*.test.js?(x)' , 
8- 		'**/@commitlint/cli/src/*.test.js?(x)' 
8+ 		'**/@commitlint/cli/src/*.test.js?(x)' , 
9+ 		'**/@commitlint/prompt-cli/*.test.js?(x)' 
910	] 
1011} ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments