<commit_before>/*
 * QUnit - A JavaScript Unit Testing Framework
 * 
 * http://docs.jquery.com/QUnit
 *
 * Copyright (c) 2009 <NAME>, <NAME>
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 */

(function(window) {

var QUnit = {

	// Initialize the configuration options
	init: function() {
		config = {
			stats: { all: 0, bad: 0 },
			moduleStats: { all: 0, bad: 0 },
			started: +new Date,
			blocking: false,
			autorun: false,
			assertions: [],
			filters: [],
			queue: []
		};

		var tests = id("qunit-tests"),
			banner = id("qunit-banner"),
			result = id("qunit-testresult");

		if ( tests ) {
			tests.innerHTML = "";
		}

		if ( banner ) {
			banner.className = "";
		}

		if ( result ) {
			result.parentNode.removeChild( result );
		}
	},
	
	// call on start of module test to prepend name to all tests
	module: function(name, testEnvironment) {
		config.currentModule = name;

		var jq = location.params.jq ? '&jq=' + location.params.jq : '';
		$(function(){ $('<li/>').append($('<a/>', { href: '?' + name + jq, text: name })).appendTo($('#qunit-modules')); });

		synchronize(function() {
			if ( config.currentModule ) {
				QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
			}

			config.currentModule = name;
			config.moduleTestEnvironment = testEnvironment;
			config.moduleStats = { all: 0, bad: 0 };

			QUnit.moduleStart( name, testEnvironment );
		});
	},
<commit_msg>Patched QUnit once again to enhance the modules rendering capabilities with cookie-persisted pass/failure flag for each module resulting in class-flagging of the `li`s (`"void"`, `"ok"` or `"failure"`).<commit_after>/*
 * QUnit - A JavaScript Unit Testing Framework
 * 
 * http://docs.jquery.com/QUnit
 *
 * Copyright (c) 2009 <NAME>, <NAME>
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 */

(function(window) {

var QUnit = {

	// Initialize the configuration options
	init: function() {
		config = {
			stats: { all: 0, bad: 0 },
			moduleStats: { all: 0, bad: 0 },
			started: +new Date,
			blocking: false,
			autorun: false,
			assertions: [],
			filters: [],
			queue: []
		};

		var tests = id("qunit-tests"),
			banner = id("qunit-banner"),
			result = id("qunit-testresult");

		if ( tests ) {
			tests.innerHTML = "";
		}

		if ( banner ) {
			banner.className = "";
		}

		if ( result ) {
			result.parentNode.removeChild( result );
		}
	},
	
	// call on start of module test to prepend name to all tests
	module: function(name, testEnvironment) {
		config.currentModule = name;

		var jq = location.params.jq ? '&jq=' + location.params.jq : '',
      cookie_id = function(name){ return 'test:module#' + name + '-pass' },
      module_cookie = $.cookie(cookie_id(name)),
      module_class= module_cookie === null ? 'void' : module_cookie == 'true' ? 'ok' : 'failure';

		$('<li/>', { 'class': module_class }).append($('<a/>', { href: '?' + name + jq, text: name })).appendTo($('#qunit-modules'));

    QUnit.moduleDone = function(name, failures, total) {
      if ( total > 1 ) {
        $.cookie('test:module#' + name + '-pass', !failures);
        var $li = $('#qunit-modules li:contains(' + name + ')');
        if ( failures ) {
          $li.addClass('failure').removeClass('ok void');
        }else{
          $li.addClass('ok').removeClass('failure void');
        }
      }
    }

		synchronize(function() {
			if ( config.currentModule ) {
				QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
			}

			config.currentModule = name;
			config.moduleTestEnvironment = testEnvironment;
			config.moduleStats = { all: 0, bad: 0 };

			QUnit.moduleStart( name, testEnvironment );
		});
	},

{'fraction_non_alphanumeric': 0.1707835325365206, 'fraction_numerical': 0.005577689243027889, 'mean_word_length': 3.1068702290076335, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '780487', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1207, 'n_words': 305}