<commit_before>var Skip = require('../../lib/vqlog/events/skip.js'),
    assert = require('assert');

describe('vqlog', function() {
  describe('log', function() {
    describe('events', function() {
      describe('skip', function() {
        var skip;

        describe('#fromMessage', function() {
          describe('exit boundary message', function() {
            beforeEach(function() {
              skip = Skip.fromMessage("Part is skipped (exit boundary), area 2, work_id 34, tray 0, model_id 1, cur_x 955, bound 945");
            });

            it('has the right reason', function() {
              assert.equal('exit boundary', skip.reason);
            });

            it('has the right area', function() {
              assert.equal(2, skip.areaId);
            });

            it('has the right workId', function() {
              assert.equal(34, skip.workId);
            });

            it('has the right tray id', function() {
              assert.equal(0, skip.trayId);
            });

            it('has the right model id', function() {
              assert.equal(1, skip.modelId);
            });

            it('has the right currentX', function() {
              assert.equal(955, skip.currentX);
            });

            it('has the right bound', function() {
              assert.equal(945, skip.bound);
            });
          }); /* exit boundary */

          describe('npicked > n2pick message', function() {
            beforeEach(function() {
              skip = Skip.fromMessage("Part is skipped (npicked > n2pick), area 1, work_id 99, tray 0, model_id 1");
            });

            it('has the right reason', function() {
              assert.equal('npicked > n2pick', skip.reason);
            });

            it('has the right area', function() {
              assert.equal(1, skip.areaId);
            });

            it('has the right workId', function() {
              assert.equal(99, skip.workId);
            });

            it('has the right tray id', function() {
              assert.equal(0, skip.trayId);
            });

            it('has the right model id', function() {
              assert.equal(1, skip.modelId);
            });

            it('has the right currentX', function() {
              assert.equal(null, skip.currentX);
            });

            it('has the right bound', function() {
              assert.equal(null, skip.bound);
            });
          }); /* exit boundary */

        });
      }); /* skip */
    }); /* events */
  }); /* log */
}); /* vqlog */<commit_msg>add some tests for skip event<commit_after>var Skip = require('../../lib/vqlog/events/skip.js'),
    assert = require('assert');

describe('vqlog', function() {
  describe('log', function() {
    describe('events', function() {
      describe('skip', function() {
        var skip;

        describe('#fromMessage', function() {
          describe('exit boundary message', function() {
            beforeEach(function() {
              skip = Skip.fromMessage("Part is skipped (exit boundary), area 2, work_id 34, tray 0, model_id 1, cur_x 955, bound 945");
            });

            it('has the right reason', function() {
              assert.equal('exit boundary', skip.reason);
            });

            it('has the right area', function() {
              assert.equal(2, skip.areaId);
            });

            it('has the right workId', function() {
              assert.equal(34, skip.workId);
            });

            it('has the right tray id', function() {
              assert.equal(0, skip.trayId);
            });

            it('has the right model id', function() {
              assert.equal(1, skip.modelId);
            });

            it('has the right currentX', function() {
              assert.equal(955, skip.currentX);
            });

            it('has the right bound', function() {
              assert.equal(945, skip.bound);
            });
          }); /* exit boundary */

          describe('npicked > n2pick message', function() {
            beforeEach(function() {
              skip = Skip.fromMessage("Part is skipped (npicked > n2pick), area 1, work_id 99, tray 0, model_id 1");
            });

            it('has the right reason', function() {
              assert.equal('npicked > n2pick', skip.reason);
            });

            it('has the right area', function() {
              assert.equal(1, skip.areaId);
            });

            it('has the right workId', function() {
              assert.equal(99, skip.workId);
            });

            it('has the right tray id', function() {
              assert.equal(0, skip.trayId);
            });

            it('has the right model id', function() {
              assert.equal(1, skip.modelId);
            });

            it('has the right currentX', function() {
              assert.equal(null, skip.currentX);
            });

            it('has the right bound', function() {
              assert.equal(null, skip.bound);
            });
          }); /* exit boundary */
        });
      }); /* skip */
    }); /* events */
  }); /* log */
}); /* vqlog */
{'fraction_non_alphanumeric': 0.15256534365924493, 'fraction_numerical': 0.013552758954501452, 'mean_word_length': 1.5637717121588088, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3843335', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1325, 'n_words': 347}