<commit_before>/*!
 * socket.io-node
 * Copyright(c) 2011 LearnBoost <<EMAIL>>
 * MIT Licensed
 */

/**
 * Test dependencies.
 */

var builder = require('../../bin/builder')
  , common = require('./builder.common')
  , should = require('should');

/**
 * Tests.
 */

module.exports = {

  'version number': function () {
    builder.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/);
    builder.version.should().equal(require('../../lib/io').version);
  },

  'production build LOC': function () {
    builder(function (err, result) {
      should.strictEqual(err, null)

      var lines = result.split('\n');
      lines.length.should().be.below(5);
      lines[0].should().match(/production/gi);
      Buffer.byteLength(result).should().be.below(42000);
    });
  },

  'development build LOC': function () {
    builder({ minify: false }, function (err, result) {<commit_msg>Fixed builder test<commit_after>/*!
 * socket.io-node
 * Copyright(c) 2011 LearnBoost <<EMAIL>>
 * MIT Licensed
 */

/**
 * Test dependencies.
 */

var builder = require('../../bin/builder')
  , common = require('./builder.common')
  , should = require('should');

/**
 * Tests.
 */

module.exports = {

  'version number': function () {
    builder.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/);
    builder.version.should().equal(require('../../lib/io').version);
  },

  'production build LOC': function () {
    builder(function (err, result) {
      should.strictEqual(err, null)

      var lines = result.split('\n');
      lines.length.should().be.below(5);
      lines[0].should().match(/production/gi);
      Buffer.byteLength(result).should().be.below(43000);
    });
  },

  'development build LOC': function () {
    builder({ minify: false }, function (err, result) {
{'fraction_non_alphanumeric': 0.2233502538071066, 'fraction_numerical': 0.019176536943034405, 'mean_word_length': 3.059496567505721, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1749405', 'n_tokens_mistral': 589, 'n_tokens_neox': 564, 'n_words': 100}