mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
8554df5c61
Also convert usage of chai to jest
16 lines
452 B
TypeScript
16 lines
452 B
TypeScript
import { join } from 'upath';
|
|
import { tmpdir } from 'os';
|
|
import { init } from '../lib/workers/global/cache';
|
|
|
|
jest.mock('../lib/platform', () => ({
|
|
platform: jest.genMockFromModule('../lib/platform/github'),
|
|
initPlatform: jest.fn(),
|
|
}));
|
|
jest.mock('../lib/logger');
|
|
|
|
global.repoCache = {};
|
|
|
|
const tmpDir = process.env.RENOVATE_TMPDIR || process.env.TMPDIR || tmpdir();
|
|
const cacheDir = join(tmpDir, './renovate/cache/renovate');
|
|
|
|
init(cacheDir);
|