aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/globals.js
blob: c86469b8b22ce301d6793f8c553075f3e0ae22fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const upath = require('upath');
const os = require('os');

jest.mock('gh-got');
jest.mock('gl-got');

const cache = require('../lib/workers/global/cache');

global.platform = jest.genMockFromModule('../lib/platform/github');
global.logger = require('./logger/_fixtures');

global.repoCache = {};

const tmpDir = process.env.RENOVATE_TMPDIR || process.env.TMPDIR || os.tmpdir();
const cacheDir = upath.join(tmpDir, './renovate/cache/renovate');

cache.init(cacheDir);