Skip to content
Snippets Groups Projects
Commit 0dd604f5 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

tests: fix automerge tests

parent 27db9cfb
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,7 @@ async function renovateRepository(repoConfig, token) { ...@@ -77,7 +77,7 @@ async function renovateRepository(repoConfig, token) {
: await ensureOnboardingPr(config); : await ensureOnboardingPr(config);
await validatePrs(commonConfig || config); await validatePrs(commonConfig || config);
return res; return res;
} catch (err) { } catch (err) /* istanbul ignore next */ {
return handleError(config, err); return handleError(config, err);
} finally { } finally {
logger.setMeta({ repository: config.repository }); logger.setMeta({ repository: config.repository });
......
...@@ -19,8 +19,6 @@ Array [ ...@@ -19,8 +19,6 @@ Array [
] ]
`; `;
exports[`workers/repository renovateRepository() exits after 11 loops 1`] = `"loops>10"`;
exports[`workers/repository renovateRepository() handles baseBranches 1`] = `"onboarded"`; exports[`workers/repository renovateRepository() handles baseBranches 1`] = `"onboarded"`;
exports[`workers/repository renovateRepository() writes 1`] = `"onboarded"`; exports[`workers/repository renovateRepository() writes 1`] = `"onboarded"`;
...@@ -16,7 +16,6 @@ describe('workers/repository/error', () => { ...@@ -16,7 +16,6 @@ describe('workers/repository/error', () => {
'repository-changed', 'repository-changed',
'fork', 'fork',
'no-package-files', 'no-package-files',
'loops>10',
'config-validation', 'config-validation',
'registry-failure', 'registry-failure',
'archived', 'archived',
......
...@@ -24,17 +24,12 @@ beforeEach(() => { ...@@ -24,17 +24,12 @@ beforeEach(() => {
describe('workers/repository', () => { describe('workers/repository', () => {
describe('renovateRepository()', () => { describe('renovateRepository()', () => {
it('exits after 11 loops', async () => {
const res = await renovateRepository(config, 'some-token', 11);
expect(res).toMatchSnapshot();
});
it('writes', async () => { it('writes', async () => {
initRepo.mockReturnValue({}); initRepo.mockReturnValue({});
determineUpdates.mockReturnValue({ determineUpdates.mockReturnValue({
repoIsOnboarded: true, repoIsOnboarded: true,
branches: [{ type: 'minor' }, { type: 'pin' }], branches: [{ type: 'minor' }, { type: 'pin' }],
}); });
writeUpdates.mockReturnValueOnce('automerged');
writeUpdates.mockReturnValueOnce('onboarded'); writeUpdates.mockReturnValueOnce('onboarded');
const res = await renovateRepository(config, 'some-token'); const res = await renovateRepository(config, 'some-token');
expect(res).toMatchSnapshot(); expect(res).toMatchSnapshot();
...@@ -69,7 +64,6 @@ describe('workers/repository', () => { ...@@ -69,7 +64,6 @@ describe('workers/repository', () => {
repoIsOnboarded: true, repoIsOnboarded: true,
branches: [], branches: [],
}); });
writeUpdates.mockReturnValueOnce('automerged');
writeUpdates.mockReturnValueOnce('onboarded'); writeUpdates.mockReturnValueOnce('onboarded');
const res = await renovateRepository(config, 'some-token'); const res = await renovateRepository(config, 'some-token');
expect(res).toMatchSnapshot(); expect(res).toMatchSnapshot();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment