cletus/node_modules/cron-parser/test/empty_around_comma.js
2025-05-09 15:53:19 -05:00

22 lines
519 B
JavaScript

// empty around comma
var test = require('tap').test;
var CronExpression = require('../lib/expression');
const options = {
utc: true
};
test('both empty around comma', function (t) {
t.throws(function () {
CronExpression.parse('*/10 * * * * ,', options);
}, new Error('Invalid list value format'));
t.end();
});
test('one side empty around comma', function (t) {
t.throws(function () {
CronExpression.parse('*/10 * * * * ,2', options);
}, new Error('Invalid list value format'));
t.end();
});