Skip to content

Commit 25ff764

Browse files
committed
quickpush
1 parent 9909f60 commit 25ff764

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

test/apply/dependabot.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,43 @@ t.test('empty branch config falls back to global schedule', async t => {
232232
schedule: { interval: 'monthly' },
233233
})
234234
})
235+
236+
t.test('no package schedule and no branch schedule falls back to default', async t => {
237+
const s = await setupDependabot(t, {
238+
// no dependabotSchedule at package level
239+
dependabot: {
240+
main: {}, // empty object, no schedule
241+
},
242+
})
243+
244+
t.match(s.dependabot[0], {
245+
schedule: { interval: 'daily' }, // should fall back to default
246+
})
247+
})
248+
249+
t.test('branch config as string without schedule falls back properly', async t => {
250+
const s = await setupDependabot(t, {
251+
// no dependabotSchedule at package level
252+
dependabot: {
253+
main: 'auto', // string config, no schedule property
254+
},
255+
})
256+
257+
t.match(s.dependabot[0], {
258+
schedule: { interval: 'daily' }, // should fall back to default
259+
'versioning-strategy': 'auto',
260+
})
261+
})
262+
263+
t.test('falsy package schedule and no branch schedule falls back to default', async t => {
264+
const s = await setupDependabot(t, {
265+
dependabotSchedule: null, // explicitly falsy
266+
dependabot: {
267+
main: {}, // empty object, no schedule
268+
},
269+
})
270+
271+
t.match(s.dependabot[0], {
272+
schedule: { interval: 'daily' }, // should fall back to default
273+
})
274+
})

0 commit comments

Comments
 (0)