Skip to content

Commit

Permalink
fix(deps): bump probot from 10.0.0-beta.15 to 10.0.0-beta.17 (#287)
Browse files Browse the repository at this point in the history
* fix(deps): bump probot from 10.0.0-beta.15 to 10.0.0-beta.17

Bumps [probot](https://github.com/probot/probot) from 10.0.0-beta.15 to 10.0.0-beta.17.
- [Release notes](https://github.com/probot/probot/releases)
- [Commits](probot/probot@v10.0.0-beta.15...v10.0.0-beta.17)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* wip(probot-beta): changes toward updating tests for the latest beta

* test: rename `cert` option to `privateKey`

* test: use `nockScope.pendingMocks()` instead of `nockScope.done()` for more helpful error message

* test: refactor how `octokit` is mocked in unit tests

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Matt Travi <programmer@travi.org>
Co-authored-by: Gregor Martynus <gregor@martynus.net>
  • Loading branch information
3 people committed Aug 11, 2020
1 parent 601ec81 commit 3c14011
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 42 deletions.
91 changes: 58 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"deepmerge": "^4.2.2",
"js-yaml": "^3.14.0",
"probot": "10.0.0-beta.15"
"probot": "10.0.0-beta.17"
},
"devDependencies": {
"@travi/any": "^2.0.10",
Expand Down
6 changes: 3 additions & 3 deletions test/integration/common.js
@@ -1,4 +1,4 @@
const { createProbot } = require('probot')
const { Probot } = require('probot')
const nock = require('nock')
const any = require('@travi/any')
const settingsBot = require('../../index')
Expand All @@ -17,7 +17,7 @@ const repository = {
}

function loadInstance () {
const probot = createProbot({ id: 1, cert: 'test', githubToken: 'test' })
const probot = new Probot({ id: 1, privateKey: 'test', githubToken: 'test' })
probot.load(settingsBot)

return probot
Expand All @@ -28,7 +28,7 @@ function initializeNock () {
}

function teardownNock (githubScope) {
expect(githubScope.isDone()).toBe(true)
expect(githubScope.pendingMocks()).toStrictEqual([])

nock.cleanAll()
}
Expand Down
17 changes: 12 additions & 5 deletions test/unit/index.test.js
@@ -1,15 +1,22 @@
const { Application } = require('probot')
const any = require('@travi/any')
const plugin = require('../../index')

describe('plugin', () => {
let app, event, sync, github
let app, event, sync

beforeEach(() => {
app = new Application()
github = {
request: jest.fn(() => Promise.resolve({ data: { content: '' } }))
class Octokit {
static defaults () {
return Octokit
}

constructor () {
this.request = jest.fn(() => Promise.resolve({ data: { content: '' } }))
}
}
app.auth = () => Promise.resolve(github)

app = new Application({ secret: any.string(), Octokit })

event = {
name: 'push',
Expand Down

0 comments on commit 3c14011

Please sign in to comment.