<commit_before>/*
 * jobber-test.js: Tests for jobber module
 *
 * (C) 2010 <NAME>
 *
 */
  
var sys = require('sys'),
    fs = require('fs'),
    vows = require('vows'),
    assert = require('assert');

require.paths.unshift(require('path').join(__dirname, '..', 'lib'));

var jobber = require('jobber'), testJob;

vows.describe('jobber').addBatch({
  "When using an instance of the JobManager": {
    topic: function () {
      var manager = new jobber.JobManager();
      testJob = manager.addJob({ user: 'bar' });
      
      return manager;
    },
    "the addJob() method": {
      "should return a valid job": function (manager) {
        var job = manager.addJob({ user: 'foo' });
        assert.isNotNull(job);
        assert.include(job, 'id');
        assert.equal(job.finished, false);
        assert.equal(job.user, 'foo');
      }
    },
    "the getJob() method": {
      "should return a valid job": function (manager) {
        var job = manager.getJob(testJob.id);
        assert.isNotNull(job);
        assert.include(job, 'id');
        assert.equal(job.id, testJob.id);<commit_msg>[minor dist] Version bump. 0.1.0<commit_after>/*
 * jobber-test.js: Tests for jobber module
 *
 * (C) 2010 <NAME>
 *
 */

require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
  
var sys = require('sys'),
    fs = require('fs'),
    vows = require('vows'),
    assert = require('assert'),
    jobber = require('jobber');
    
var testJob;

vows.describe('jobber').addBatch({
  "When using an instance of the JobManager": {
    topic: function () {
      var manager = new jobber.JobManager();
      testJob = manager.addJob({ user: 'bar' });
      
      return manager;
    },
    "the addJob() method": {
      "should return a valid job": function (manager) {
        var job = manager.addJob({ user: 'foo' });
        assert.isNotNull(job);
        assert.include(job, 'id');
        assert.equal(job.finished, false);
        assert.equal(job.user, 'foo');
      }
    },
    "the getJob() method": {
      "should return a valid job": function (manager) {
        var job = manager.getJob(testJob.id);
        assert.isNotNull(job);
        assert.include(job, 'id');
        assert.equal(job.id, testJob.id);
{'fraction_non_alphanumeric': 0.1715181370353784, 'fraction_numerical': 0.0049261083743842365, 'mean_word_length': 2.6622950819672133, 'pattern_counts': {'":': 10, '<': 5, '<?xml version=': 0, '>': 5, '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': '5175001', 'n_tokens_mistral': 721, 'n_tokens_neox': 707, 'n_words': 171}