File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ describe('detect-node-support', () => {
596
596
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
597
597
} )
598
598
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
599
- . reply ( 403 , null , {
599
+ . reply ( 403 , '' , {
600
600
'x-ratelimit-limit' : '60' ,
601
601
'x-ratelimit-remaining' : '0' ,
602
602
'x-ratelimit-reset' : `${ Math . round ( Date . now ( ) / 1000 ) + 1 } `
@@ -635,10 +635,11 @@ describe('detect-node-support', () => {
635
635
. reply ( 200 , {
636
636
content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
637
637
} )
638
+ // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
638
639
. get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
639
- . reply ( 403 , 'Abuse detected ' ) ;
640
+ . reply ( 403 , 'You have exceeded a secondary rate limit ' ) ;
640
641
641
- await expect ( NodeSupport . detect ( { repository : 'git+https://github.com/pkgjs/detect-node-support.git' } ) ) . to . reject ( / A b u s e d e t e c t e d / ) ;
642
+ await expect ( NodeSupport . detect ( { repository : 'git+https://github.com/pkgjs/detect-node-support.git' } ) ) . to . reject ( / Y o u h a v e e x c e e d e d a s e c o n d a r y r a t e l i m i t / ) ;
642
643
} ) ;
643
644
} ) ;
644
645
You can’t perform that action at this time.
0 commit comments