<commit_before>// TODO disable reordering for this suite!

var moduleStart = 0,
	moduleDone = 0;

QUnit.moduleStart = function() {
	moduleStart++;
};
QUnit.moduleDone = function() {
	moduleDone++;
};
QUnit.testStart = function() {
	ok(true, "testStart called once per test");
};
QUnit.testDone = function() {
	ok(true, "testDone called once per test");
};

module("logs 1");

test("test1", 3, function() {
	equal(moduleStart, 1, "moduleStart called once per module");
	equal(moduleDone, 0, "moduleDone called once per module");
});
test("test2", 3, function() {
	equal(moduleStart, 1, "moduleStart called once per module");
	equal(moduleDone, 0, "moduleDone called once per module");
});

module("logs 2");
	
test("test1", 3, function() {
	equal(moduleStart, 2, "moduleStart called once per module");
	equal(moduleDone, 1, "moduleDone called once per module");
});
test("test2", 3, function() {
	equal(moduleStart, 2, "moduleStart called once per module");
	equal(moduleDone, 1, "moduleDone called once per module");
});
<commit_msg>Extended test/logs.html to capture more of the callbacks.<commit_after>// TODO disable reordering for this suite!


var begin = 0,
	moduleStart = 0,
	moduleDone = 0,
	testStart = 0,
	testDone = 0,
	log = 0,
	moduleName,
	testName;

QUnit.begin = function() {
	begin++;
};
QUnit.done = function() {
};
QUnit.moduleStart = function(name) {
	moduleStart++;
	moduleName = name;
};
QUnit.moduleDone = function() {
	moduleDone++;
};
QUnit.testStart = function(name) {
	testStart++;
	testName = name;
};
QUnit.testDone = function() {
	testDone++;
};
QUnit.log = function() {
	log++;
};

var logs = ["begin", "testStart", "testDone", "log", "moduleStart", "moduleDone", "done"];
for (var i = 0; i < logs.length; i++) {
	(function() {
		var log = logs[i],
			logger = QUnit[log];
		QUnit[log] = function() {
			console.log(log, arguments);
			logger.apply(this, arguments);
		};
	})();
}

module("logs1");

test("test1", 8, function() {
	equal(begin, 1);
	equal(moduleStart, 1);
	equal(testStart, 1);
	equal(testDone, 0);
	equal(moduleDone, 0);
	equal(moduleName, "logs1");
	equal(testName, "test1");
	equal(log, 7);
});
test("test2", 8, function() {
	equal(begin, 1);
	equal(moduleStart, 1);
	equal(testStart, 2);
	equal(testDone, 1);
	equal(moduleDone, 0);
	equal(moduleName, "logs1");
	equal(testName, "test2");
	equal(log, 15);
});

module("logs2");
	
test("test1", 8, function() {
	equal(begin, 1);
	equal(moduleStart, 2);
	equal(testStart, 3);
	equal(testDone, 2);
	equal(moduleDone, 1);
	equal(moduleName, "logs2");
	equal(testName, "test1");
	equal(log, 23);
});
test("test2", 8, function() {
	equal(begin, 1);
	equal(moduleStart, 2);
	equal(testStart, 4);
	equal(testDone, 3);
	equal(moduleDone, 1);
	equal(moduleName, "logs2");
	equal(testName, "test2");
	equal(log, 31);
});

{'fraction_non_alphanumeric': 0.1879003558718861, 'fraction_numerical': 0.025622775800711744, 'mean_word_length': 5.232815964523281, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6458053', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1008, 'n_words': 265}