Skip to content

Commit 16d08e4

Browse files
committed
test: update fixtures for latest octokit client
1 parent d5a7deb commit 16d08e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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(/Abuse detected/);
642+
await expect(NodeSupport.detect({ repository: 'git+https://github.com/pkgjs/detect-node-support.git' })).to.reject(/You have exceeded a secondary rate limit/);
642643
});
643644
});
644645

0 commit comments

Comments
 (0)