renovate/lib/workers/repository/index.spec.ts
Maksim 06d8c27043
refactor: global config (#12743)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2021-11-23 21:10:45 +01:00

29 lines
863 B
TypeScript

import { mock } from 'jest-mock-extended';
import { RenovateConfig, getConfig, mocked } from '../../../test/util';
import { GlobalConfig } from '../../config/global';
import * as _process from './process';
import { ExtractResult } from './process/extract-update';
import { renovateRepository } from '.';
const process = mocked(_process);
jest.mock('./init');
jest.mock('./process');
jest.mock('./result');
jest.mock('./error');
describe('workers/repository/index', () => {
describe('renovateRepository()', () => {
let config: RenovateConfig;
beforeEach(() => {
config = getConfig();
GlobalConfig.set({ localDir: '' });
});
it('runs', async () => {
process.extractDependencies.mockResolvedValue(mock<ExtractResult>());
const res = await renovateRepository(config);
expect(res).toBeUndefined();
});
});
});