2019-04-09 15:14:08 +00:00
|
|
|
const upath = require('upath');
|
|
|
|
const os = require('os');
|
2018-09-03 05:27:22 +00:00
|
|
|
const cache = require('../lib/workers/global/cache');
|
|
|
|
|
2019-09-10 07:50:29 +00:00
|
|
|
jest.mock('../lib/platform', () => ({
|
|
|
|
platform: jest.genMockFromModule('../lib/platform/github'),
|
|
|
|
initPlatform: jest.fn(),
|
|
|
|
}));
|
2019-07-15 09:04:05 +00:00
|
|
|
jest.mock('../lib/logger');
|
2018-09-03 05:27:22 +00:00
|
|
|
|
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);
|