renovate/test/globals.ts
Jamie Magee 8554df5c61 test: convert top level tests to typescript (#4526)
Also convert usage of chai to jest
2019-09-25 11:40:58 +02:00

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);