Skip to content

Commit

Permalink
test(integration): disabled throttle and retry for integration tests
Browse files Browse the repository at this point in the history
for #145
  • Loading branch information
travi committed Jun 16, 2023
1 parent 7323d16 commit 9a11e8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint:peer": "npm ls >/dev/null",
"test:unit": "jest 'test/unit/'",
"test:unit:watch": "npm run test:unit -- --watch",
"test:integration": "jest --test-timeout=20000 'test/integration/'",
"test:integration": "jest 'test/integration/'",
"test:integration:debug": "LOG_LEVEL=debug DEBUG=nock.* run-s test:integration"
},
"author": "Brandon Keepers",
Expand Down
12 changes: 10 additions & 2 deletions test/integration/common.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Probot } = require('probot')
const { Probot, ProbotOctokit } = require('probot')
const nock = require('nock')
const any = require('@travi/any')
const settingsBot = require('../../index')
Expand All @@ -17,7 +17,15 @@ const repository = {
}

async function loadInstance () {
const probot = new Probot({ appId: 1, privateKey: 'test', githubToken: 'test' })
const probot = new Probot({
appId: 1,
privateKey: 'test',
githubToken: 'test',
Octokit: ProbotOctokit.defaults({
retry: { enabled: false },
throttle: { enabled: false }
})
})
await probot.load(settingsBot)

return probot
Expand Down

0 comments on commit 9a11e8a

Please sign in to comment.