renovate/test/globals.js

19 lines
513 B
JavaScript
Raw Normal View History

const upath = require('upath');
const os = require('os');
jest.mock('gh-got');
jest.mock('gl-got');
const cache = require('../lib/workers/global/cache');
2017-11-07 12:31:34 +00:00
global.platform = jest.genMockFromModule('../lib/platform/github');
global.logger = require('./logger/_fixtures');
2018-12-17 14:08:43 +00:00
global.renovateUsername = 'renovate-testing';
global.repoCache = {};
2018-12-17 14:08:43 +00:00
const tmpDir = process.env.RENOVATE_TMPDIR || process.env.TMPDIR || os.tmpdir();
const cacheDir = upath.join(tmpDir, './renovate/cache/renovate');
cache.init(cacheDir);