renovate/test/globals.js
Rhys Arkins a599eab231
feat: unify file locations (#3507)
feat: unify file locations
2019-04-09 17:14:08 +02:00

18 lines
513 B
JavaScript

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.renovateUsername = 'renovate-testing';
global.repoCache = {};
const tmpDir = process.env.RENOVATE_TMPDIR || process.env.TMPDIR || os.tmpdir();
const cacheDir = upath.join(tmpDir, './renovate/cache/renovate');
cache.init(cacheDir);