<commit_before>/* jshint node:true */
"use strict";

/**
 *	Simple test framework
 */
var events = require('events');
var util = require('util');

if ( typeof Promise === 'undefined' ) {
	/* jshint -W040 */
	(function(global) { global.Promise = require('promise-polyfill'); }(this));
	/* jshint +W040 */
}

var style = require('console-style');

function TestQueue(options) {
	
	options = options || {};

	events.EventEmitter.call(this);
	
	this.stopOnFail = options.stopOnFail !== false;
	this.setupFn = function(){};
	this.teardownFn = function(){};

	this.tests = [];
}

util.inherits( TestQueue, events.EventEmitter );

/**
 *	Adds a tests
 */
TestQueue.prototype.addTest = function( name, fn ) {
	this.tests.push( { name: name, fn: fn } );
	return this;
};

/**
 *	Adds a setup function
 */<commit_msg>Bad way of requiring Promise<commit_after>/* jshint node:true */
"use strict";

/**
 *	Simple test framework
 */
var events = require('events');
var util = require('util');
var Promise = require('promise-polyfill');
var style = require('console-style');

function TestQueue(options) {
	
	options = options || {};

	events.EventEmitter.call(this);
	
	this.stopOnFail = options.stopOnFail !== false;
	this.setupFn = function(){};
	this.teardownFn = function(){};

	this.tests = [];
}

util.inherits( TestQueue, events.EventEmitter );

/**
 *	Adds a tests
 */
TestQueue.prototype.addTest = function( name, fn ) {
	this.tests.push( { name: name, fn: fn } );
	return this;
};

/**
 *	Adds a setup function
 */
{'fraction_non_alphanumeric': 0.18067504963600264, 'fraction_numerical': 0.003970880211780278, 'mean_word_length': 3.99009900990099, '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': '3881255', 'n_tokens_mistral': 518, 'n_tokens_neox': 504, 'n_words': 121}