<commit_before>var webbuild = require('../lib/webbuild');

var input = __dirname + '/playground/program.js';
var output = __dirname + '/build.js';

exports["test Build"] = function (assert, done) {
	webbuild(input, output, function (err) {
		if (err) {
			assert.fail(err);
			done();
			return;
		}
		var program = require('./build');

		assert.equal(typeof program.a, "object",
			"require module");
		assert.equal(program.a.name, 'a',
			"make sure it's expected module");
		var c = program.a.getC();
		assert.equal(c.name, 'c',
			"require module via defered call");
		var c2 = program.a.getC();
		assert.ok(c === c2,
			"require same module twice (both calls should return same object)");
		assert.equal(c.b.name, 'b',
			"require within required module");
		assert.ok(c === c.b.c,
			"circular dependency");
		done();
	});
};

if (module == require.main) {
	require('test').run(exports);
}<commit_msg>Better assertion<commit_after>var webbuild = require('../lib/webbuild');

var input = __dirname + '/playground/program.js';
var output = __dirname + '/build.js';

exports["test Build"] = function (assert, done) {
	webbuild(input, output, function (err) {
		if (err) {
			assert.fail(err);
			done();
			return;
		}
		var program = require('./build');

		assert.equal(typeof program.a, "object",
			"require module");
		assert.equal(program.a.name, 'a',
			"make sure it's expected module");
		var c = program.a.getC();
		assert.equal(c && c.name, 'c',
			"require module via defered call");
		var c2 = program.a.getC();
		assert.ok(c === c2,
			"require same module twice (both calls should return same object)");
		assert.equal(c.b.name, 'b',
			"require within required module");
		assert.ok(c === c.b.c,
			"circular dependency");
		done();
	});
};

if (module == require.main) {
	require('test').run(exports);
}
{'fraction_non_alphanumeric': 0.18660812294182216, 'fraction_numerical': 0.0021953896816684962, 'mean_word_length': 3.7722513089005236, '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': '593856', 'n_tokens_mistral': 688, 'n_tokens_neox': 622, 'n_words': 162}