File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11{
22  "type" : " commonjs"  ,
33  "name" : " typescript-telegram-bot-api"  ,
4-   "version" : " 0.3.5 "  ,
4+   "version" : " 0.3.6 "  ,
55  "description" : " Telegram Bot API wrapper for Node.js written in TypeScript"  ,
66  "repository" : " github:Borodin/typescript-telegram-bot-api"  ,
77  "main" : " dist/index.js"  ,
Original file line number Diff line number Diff line change @@ -51,6 +51,15 @@ describe('TelegramBot', () => {
5151      } ) . getMe ( ) , 
5252    ) . rejects . toThrow ( / g e t a d d r i n f o   ( E N O T F O U N D | E A I _ A G A I N )   i n v a l i d _ u r l / ) ; 
5353  } ) ; 
54+ 
55+   it ( 'should throw "401 Unauthorized" error with a valid botToken' ,  async  ( )  =>  { 
56+     await  expect ( 
57+       new  TelegramBot ( { 
58+         botToken : TOKEN , 
59+         testEnvironment : true , 
60+       } ) . getMe ( ) , 
61+     ) . rejects . toThrow ( '401 Unauthorized' ) ; 
62+   } ) ; 
5463} ) ; 
5564
5665describe ( '.processUpdate()' ,  ( )  =>  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments