<commit_before>'use strict';


var assert = require('assert');
var fullEqual = require('assert-full-equal').fullEqual;
var util = require('util');
var jsyaml = require('../../lib/js-yaml');

var _classes = require('../support/classes');
var _functional = require('../support/functional');
var TestLoader = require('../support/test-loader');


_functional.generateTests({
  description: 'Test constructor.',
  files: ['.data', '.code'],
  handler: function (dataFile, codeFile) {
    var object1 = [],
        object2 = eval('(' + codeFile.data + ')');

    jsyaml.loadAll(dataFile.data, function (doc) {
      object1.push(doc);
    }, TestLoader);

    if (object1.length === 1) {
      object1 = object1[0];
    }

    fullEqual(object1, object2);<commit_msg>Remove unused imports in constructor tests<commit_after>'use strict';


var fullEqual = require('assert-full-equal').fullEqual;
var jsyaml = require('../../lib/js-yaml');

var _classes = require('../support/classes');
var _functional = require('../support/functional');
var TestLoader = require('../support/test-loader');


_functional.generateTests({
  description: 'Test constructor.',
  files: ['.data', '.code'],
  handler: function (dataFile, codeFile) {
    var object1 = [],
        object2 = eval('(' + codeFile.data + ')');

    jsyaml.loadAll(dataFile.data, function (doc) {
      object1.push(doc);
    }, TestLoader);

    if (object1.length === 1) {
      object1 = object1[0];
    }

    fullEqual(object1, object2);
{'fraction_non_alphanumeric': 0.1851106639839034, 'fraction_numerical': 0.01341381623071764, 'mean_word_length': 3.6625, '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': '496850', 'n_tokens_mistral': 470, 'n_tokens_neox': 449, 'n_words': 100}