2019-04-09 15:14:08 +00:00
|
|
|
const upath = require('upath');
|
|
|
|
const os = require('os');
|
|
|
|
|
2017-11-07 10:46:10 +00:00
|
|
|
jest.mock('gh-got');
|
|
|
|
jest.mock('gl-got');
|
|
|
|
|
2018-09-03 05:27:22 +00:00
|
|
|
const cache = require('../lib/workers/global/cache');
|
|
|
|
|
2017-11-07 12:31:34 +00:00
|
|
|
global.platform = jest.genMockFromModule('../lib/platform/github');
|
2019-03-11 15:50:10 +00:00
|
|
|
global.logger = require('./logger/_fixtures');
|
2018-09-03 05:27:22 +00:00
|
|
|
|
2018-12-17 14:08:43 +00:00
|
|
|
global.renovateUsername = 'renovate-testing';
|
2018-12-25 11:31:51 +00:00
|
|
|
global.repoCache = {};
|
2018-12-17 14:08:43 +00:00
|
|
|
|
2019-04-09 15:14:08 +00:00
|
|
|
const tmpDir = process.env.RENOVATE_TMPDIR || process.env.TMPDIR || os.tmpdir();
|
|
|
|
const cacheDir = upath.join(tmpDir, './renovate/cache/renovate');
|
|
|
|
|
|
|
|
cache.init(cacheDir);
|