{"size": 500, "ext": "js", "max_stars_repo_path": "node_modules/node-cron/test/pattern-validation/validate-pattern-type.js", "max_stars_repo_name": "ExplodingCow/awesome-schedule-nodejs", "max_stars_repo_stars_event_min_datetime": "2018-01-30T13:56:36.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-10T09:12:29.000Z", "max_issues_repo_path": "node_modules/node-cron/test/pattern-validation/validate-pattern-type.js", "max_issues_repo_name": "ExplodingCow/awesome-schedule-nodejs", "max_issues_repo_issues_event_min_datetime": "2020-07-20T22:18:27.000Z", "max_issues_repo_issues_event_max_datetime": "2020-07-20T22:18:27.000Z", "max_forks_repo_path": "node_modules/node-cron/test/pattern-validation/validate-pattern-type.js", "max_forks_repo_name": "ExplodingCow/awesome-schedule-nodejs", "max_forks_repo_forks_event_min_datetime": "2021-11-01T23:32:13.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-01T23:32:13.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 22.7272727273, "max_line_length": 68, "alphanum_fraction": 0.562}
'use strict';

var expect = require('expect.js');
var Task = require('../../src/task');

describe('Task', function(){
  it('should accept string for pattern', function(){
     expect(function(){
        new Task('* * * * *');
      }).to.not.throwException();
  });

   it('should fail with a non string value for pattern', function(){
     expect(function(){
        new Task([]);
      }).to.throwException(function(e){
        expect('pattern must be a string!').to.equal(e);
      });
  });

});
