mirror of
https://github.com/zhigang1992/probot.git
synced 2026-06-16 11:50:10 +08:00
15 lines
435 B
TypeScript
15 lines
435 B
TypeScript
// FIXME: move this to a test helper that can be used by other apps
|
|
|
|
import cacheManager from 'cache-manager'
|
|
import { Application, ApplicationFunction } from '../../src'
|
|
|
|
const cache = cacheManager.caching({ store: 'memory', ttl: 0 })
|
|
|
|
const jwt = jest.fn().mockReturnValue('test')
|
|
|
|
export function createApp (appFn?: ApplicationFunction) {
|
|
const app = new Application({ app: jwt, cache })
|
|
appFn && app.load(appFn)
|
|
return app
|
|
}
|