<commit_before>var vows = require('vows'),
    assert = require('assert');

var PMysql = require('lib/PMysql');

var suite = vows.describe('PMysql');

suite.addBatch({
  'constructor': {
    'set config': function() {
      var pMysql = new PMysql(null);
      assert.strictEqual(pMysql.config, null);

      var pMysql = new PMysql(7);
      assert.strictEqual(pMysql.config, 7);
    },
    'optionally accept mysql dependency': function() {
      var pMysql = new PMysql(null, 77);
      assert.strictEqual(pMysql.mysql, 77);

      var pMysql = new PMysql(null);
      assert.strictEqual(pMysql.mysql, require('mysql'));
    },
  }
});

suite.export(module);<commit_msg>PMysql: convert tests for constructor; finish converting tests<commit_after>var assert = require('assert');

var PMysql = require('lib/PMysql');

describe('constructor', function() {
  it('should set the config', function() {
    var pMysql = new PMysql(null);
    assert.strictEqual(pMysql.config, null);

    var pMysql = new PMysql(7);
    assert.strictEqual(pMysql.config, 7);
  });

  it('should accept an optional mysql dependency', function() {
    var pMysql = new PMysql(null, 77);
    assert.strictEqual(pMysql.mysql, 77);

    var pMysql = new PMysql(null);
    assert.strictEqual(pMysql.mysql, require('mysql'));
  });
});
{'fraction_non_alphanumeric': 0.1514919663351186, 'fraction_numerical': 0.009181331293037491, 'mean_word_length': 3.862453531598513, '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': '5799939', 'n_tokens_mistral': 466, 'n_tokens_neox': 447, 'n_words': 98}