diff --git a/lib/workers/package/index.js b/lib/workers/package/index.js index feea0d0ca4b188fc56f493ee18a5b38d91deeed6..4411d3ed4ab7f421bd31363a66a8f48b79d09cb6 100644 --- a/lib/workers/package/index.js +++ b/lib/workers/package/index.js @@ -18,6 +18,7 @@ async function findUpgrades(config) { } // Check schedule if ( + config.repoIsOnboarded && config.schedule && config.schedule.length && schedule.isScheduledNow(config) === false diff --git a/test/workers/package/index.spec.js b/test/workers/package/index.spec.js index 703a6fbf654dd6a01abc46072ac053c168ba479f..164e3250513b7ddf3561f97eacc7fefac1a453a8 100644 --- a/test/workers/package/index.spec.js +++ b/test/workers/package/index.spec.js @@ -22,6 +22,7 @@ describe('lib/workers/package/index', () => { expect(res).toMatchObject([]); }); it('returns empty if package is not scheduled', async () => { + config.repoIsOnboarded = true; config.schedule = 'some schedule'; schedule.isScheduledNow.mockReturnValueOnce(false); const res = await pkgWorker.findUpgrades(config); @@ -29,6 +30,7 @@ describe('lib/workers/package/index', () => { expect(npmApi.getDependency.mock.calls.length).toBe(0); }); it('returns error if no npm dep found', async () => { + config.repoIsOnboarded = true; config.schedule = 'some schedule'; schedule.isScheduledNow.mockReturnValueOnce(true); const res = await pkgWorker.findUpgrades(config);