Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
nock('https://api.github.com')
.post(/\/installations\/[\d\w-]+\/access_tokens/)
.reply(200, {
token: 'mocked-token',
expires_at: '9999-12-31T23:59:59Z'
})
.get('/repos/test-repo-owner/test-repo-name/contents/.github/jira.yml')
.reply(200, {
content: Buffer.from(`jira: ${process.env.ATLASSIAN_URL}`).toString('base64')
})
const configureRobot = require('../../lib/configure-robot')
global.app = configureRobot(new Application({
app: createGitHubApp({
id: 12257,
cert: findPrivateKey()
}),
cache: cacheManager.caching({
store: 'memory',
ttl: 60 * 60 // 1 hour
})
}))
})