mirror of
https://github.com/zhigang1992/probot.git
synced 2026-06-15 18:37:42 +08:00
17 lines
407 B
JavaScript
17 lines
407 B
JavaScript
// FIXME: move this to a test helper that can be used by other apps
|
|
|
|
const cacheManager = require('cache-manager')
|
|
const {Application} = require('../../src')
|
|
|
|
const cache = cacheManager.caching({store: 'memory'})
|
|
|
|
const jwt = jest.fn().mockReturnValue('test')
|
|
|
|
module.exports = {
|
|
createApp (plugin = () => {}) {
|
|
const app = new Application({app: jwt, cache})
|
|
app.load(plugin)
|
|
return app
|
|
}
|
|
}
|