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', () => {
596596 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
597597 } )
598598 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
599- . reply ( 403 , null , {
599+ . reply ( 403 , '' , {
600600 'x-ratelimit-limit' : '60' ,
601601 'x-ratelimit-remaining' : '0' ,
602602 'x-ratelimit-reset' : `${ Math . round ( Date . now ( ) / 1000 ) + 1 } `
@@ -635,10 +635,11 @@ describe('detect-node-support', () => {
635635 . reply ( 200 , {
636636 content : Fs . readFileSync ( Path . join ( __dirname , '..' , 'package.json' ) ) . toString ( 'base64' )
637637 } )
638+ // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
638639 . get ( '/repos/pkgjs/detect-node-support/contents/.travis.yml' )
639- . reply ( 403 , 'Abuse detected ' ) ;
640+ . reply ( 403 , 'You have exceeded a secondary rate limit ' ) ;
640641
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 / ) ;
642643 } ) ;
643644 } ) ;
644645
You can’t perform that action at this time.
0 commit comments