Skip to content

Commit d7f78d8

Browse files
committed
use regex as a less brittle check for any number of zeros
1 parent d0a136c commit d7f78d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/unit/actions-workflows.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ describe('GitHub Actions workflows', () => {
4848
test('no scheduled workflows run on the hour', () => {
4949
const hourlySchedules = scheduledWorkflows.filter(schedule => {
5050
const hour = schedule.split(' ')[0]
51-
return hour === '0' || hour === '00'
51+
// return any minute cron segments that equal 0, 00, 000, etc.
52+
return !/[^0]/.test(hour)
5253
})
5354
expect(hourlySchedules).toEqual([])
5455
})

0 commit comments

Comments
 (0)