2019-09-25 09:40:58 +00:00
|
|
|
import { join } from 'upath';
|
|
|
|
import { tmpdir } from 'os';
|
|
|
|
import { init } from '../lib/workers/global/cache';
|
2018-09-03 05:27:22 +00:00
|
|
|
|
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-09-25 09:40:58 +00:00
|
|
|
const tmpDir = process.env.RENOVATE_TMPDIR || process.env.TMPDIR || tmpdir();
|
|
|
|
const cacheDir = join(tmpDir, './renovate/cache/renovate');
|
2019-04-09 15:14:08 +00:00
|
|
|
|
2019-09-25 09:40:58 +00:00
|
|
|
init(cacheDir);
|