File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,22 @@ function validateReadFileAbortLogicDuring() {
6060  } ) ; 
6161} 
6262
63+ async  function  validateWrongSignalParam ( )  { 
64+   // Verify that if something different than Abortcontroller.signal 
65+   // is passed, ERR_INVALID_ARG_TYPE is thrown 
66+ 
67+   await  assert . rejects ( async  ( )  =>  { 
68+     const  callback  =  common . mustNotCall ( ( )  =>  { } ) ; 
69+     await  readFile ( fn ,  {  signal : 'hello'  } ,  callback ) ; 
70+   } ,  {  code : 'ERR_INVALID_ARG_TYPE' ,  name : 'TypeError'  } ) ; 
71+ 
72+ } 
73+ 
6374( async  ( )  =>  { 
6475  await  createLargeFile ( ) ; 
6576  await  validateReadFile ( ) ; 
6677  await  validateReadFileProc ( ) ; 
6778  await  validateReadFileAbortLogicBefore ( ) ; 
6879  await  validateReadFileAbortLogicDuring ( ) ; 
80+   await  validateWrongSignalParam ( ) ; 
6981} ) ( ) . then ( common . mustCall ( ) ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments