mirror of
https://github.com/zhigang1992/probot.git
synced 2026-06-15 02:18:58 +08:00
* ts-extract-github-adapter: (24 commits) Doc tweaks Remove @private Fix accidental change to catchErrors in constructor Add deprecations for `app.app()` and `app.auth` Rename `adapter` to just `github` chore(package): update ts-jest to version 23.0.0 (#602) chore(test): Convert application tests to TypeScript (#614) Clarifies the Probot requires a webhook secret (#621) chore(test): Run tslint against tests (#622) Tweak formatting of config docs (#603) Fix: Improve typing of Context (#617) fix: Make cacheErrors option optional (#616) 7.0.1 Update ocotokit/rest.js to v15.9.4 (#610) fix: Remove extra event setting (#611) Update eslint to the latest version 🚀 (#581) docs: Fix new contribution grammar (#609) update the example app id image (#606) Update links for our API (#604) Remove next tag (#595) ...
15 lines
390 B
JavaScript
15 lines
390 B
JavaScript
// FIXME: move this to a test helper that can be used by other apps
|
|
|
|
const {Application} = require('../../src')
|
|
const {GitHubApp} = require('../../src/github-app')
|
|
|
|
module.exports = {
|
|
createApp (plugin = () => {}) {
|
|
const github = new GitHubApp({})
|
|
github.jwt = jest.fn().mockReturnValue('test')
|
|
const app = new Application({github})
|
|
app.load(plugin)
|
|
return app
|
|
}
|
|
}
|