0
0
mirror of https://github.com/renovatebot/renovate.git synced 2024-12-22 13:38:32 +00:00
renovatebot_renovate/lib/workers/repository/index.spec.ts
2024-08-19 13:15:27 +00:00

33 lines
951 B
TypeScript

import { mock } from 'jest-mock-extended';
import type { RenovateConfig } from '../../../test/util';
import { mocked } from '../../../test/util';
import { getConfig } from '../../config/defaults';
import { GlobalConfig } from '../../config/global';
import * as _process from './process';
import type { 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();
});
});
});