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

32 lines
797 B
TypeScript

import type { RenovateConfig } from '../../../test/util';
import { partial } from '../../../test/util';
import { checkIfConfigured } from './configured';
let config: RenovateConfig;
beforeEach(() => {
config = partial<RenovateConfig>({
enabled: true,
forkProcessing: 'auto',
});
});
describe('workers/repository/configured', () => {
describe('checkIfConfigured()', () => {
it('returns', () => {
expect(() => checkIfConfigured(config)).not.toThrow();
});
it('throws if disabled', () => {
config.enabled = false;
expect(() => checkIfConfigured(config)).toThrow();
});
it('throws if unconfigured fork', () => {
config.enabled = true;
config.isFork = true;
expect(() => checkIfConfigured(config)).toThrow();
});
});
});