<commit_before>var assert = require('assert');
import "./startup.js";

// TODO create a test data set with running jobs so we can ensure
// that startup clears them out

// TODO
describe('running a job', function(){
  // add a job
  // see if it runs
  let newjob = {status:"waiting", name:"TestJob"};
  // Jobs.insert(newjob);
});

describe('no running jobs or wrangling datasets on startup',function(){
  it('has no running jobs', function(){
    let runjob = Jobs.findOne({status:"running"});
    assert.strictEqual(runjob, undefined);
  });
  it('has no wrangling datasets',function(){
    let ds = DataSets.findOne({currently_wrangling:true});
    assert.strictEqual(ds, undefined);
  });
});

describe('synched cron', function(){
  it('is scheduled to start another job', function(){
    let foo = SyncedCron.nextScheduledAtDate("start-next-job");
    console.log(foo);
    assert.strictEqual(typeof(foo), 'Date', "start next job at some date.");
  });<commit_msg>fix syncedcron test to not fail<commit_after>var assert = require('assert');
import "./startup.js";

// TODO create a test data set with running jobs so we can ensure
// that startup clears them out

// TODO
describe('running a job', function(){
  // add a job
  // see if it runs
  let newjob = {status:"waiting", name:"TestJob"};
  // Jobs.insert(newjob);
});

describe('no running jobs or wrangling datasets on startup',function(){
  it('has no running jobs', function(){
    let runjob = Jobs.findOne({status:"running"});
    assert.strictEqual(runjob, undefined);
  });
  it('has no wrangling datasets',function(){
    let ds = DataSets.findOne({currently_wrangling:true});
    assert.strictEqual(ds, undefined);
  });
});

describe('synched cron', function(){
  it('is scheduled to start another job', function(){
    let nextdate = SyncedCron.nextScheduledAtDate("start-next-job");
    console.log(nextdate);
    assert.strictEqual(typeof(nextdate), 'object', "start next job at some date.");
  });
{'fraction_non_alphanumeric': 0.1549367088607595, 'fraction_numerical': 0.0, 'mean_word_length': 4.34054054054054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '353915', 'n_tokens_mistral': 602, 'n_tokens_neox': 577, 'n_words': 183}