<commit_before>(function( $ ) {

window.TestHelpers = {};

function includeStyle( url ) {
	document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );
}

function includeScript( url ) {
	document.write( "<script src='../../../" + url + "'></script>" );
}

TestHelpers.loadResources = QUnit.urlParams.min ?
	function() {
		// TODO: proper include with theme images
		includeStyle( "dist/jquery-ui.min.css" );
		includeScript( "dist/jquery-ui.min.js" );
	} :
	function( resources ) {
		$.each( resources.css || [], function( i, resource ) {
			includeStyle( "themes/base/jquery." + resource + ".css" );
		});
		$.each( resources.js || [], function( i, resource ) {
			includeScript( resource );
		});
	};

function testJshint( widget ) {
	if ( QUnit.urlParams.nojshint ) {
		return;
	}

	includeScript( "external/jshint.js" );
	asyncTest( "JSHint", function() {
		expect( 1 );

		$.when(
			$.ajax({
				url: "../../../ui/.jshintrc",
				dataType: "json"
			}),
			$.ajax({
				url: "../../../ui/jquery.ui." + widget + ".js",
				dataType: "text"
			})<commit_msg>Tests: Add custom URL configs to QUnit.config.urlConfig for discoverability.<commit_after>(function( $ ) {

window.TestHelpers = {};

function includeStyle( url ) {
	document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );
}

function includeScript( url ) {
	document.write( "<script src='../../../" + url + "'></script>" );
}

QUnit.config.urlConfig.push( "min" );
TestHelpers.loadResources = QUnit.urlParams.min ?
	function() {
		// TODO: proper include with theme images
		includeStyle( "dist/jquery-ui.min.css" );
		includeScript( "dist/jquery-ui.min.js" );
	} :
	function( resources ) {
		$.each( resources.css || [], function( i, resource ) {
			includeStyle( "themes/base/jquery." + resource + ".css" );
		});
		$.each( resources.js || [], function( i, resource ) {
			includeScript( resource );
		});
	};

QUnit.config.urlConfig.push( "nojshint" );
function testJshint( widget ) {
	if ( QUnit.urlParams.nojshint ) {
		return;
	}

	includeScript( "external/jshint.js" );
	asyncTest( "JSHint", function() {
		expect( 1 );

		$.when(
			$.ajax({
				url: "../../../ui/.jshintrc",
				dataType: "json"
			}),
			$.ajax({
				url: "../../../ui/jquery.ui." + widget + ".js",
				dataType: "text"
			})
{'fraction_non_alphanumeric': 0.22144725370531823, 'fraction_numerical': 0.0008718395815170009, 'mean_word_length': 2.9982578397212545, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '480308', 'n_tokens_mistral': 863, 'n_tokens_neox': 796, 'n_words': 162}