jquery-ui/tests/lib/css.js
Scott González 7c896ddb85 Tests: Change test infrastructure to use AMD and reduce boilerplate
Ref #10119
Ref gh-1528

* Adds RequireJS and relies on AMD for loading dependencies.
* Updates to grunt-contrib-qunit 0.6.0.
* Convert `domEqual()` to a proper QUnit assertion.
* Introduces two bootstrap files (JS and CSS) which use `data-` attributes to
reduce the amount of boilerplate needed in each test
2015-04-09 09:21:06 -04:00

24 lines
568 B
JavaScript

(function() {
function includeStyle( url ) {
document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );
}
// Find the script element
var scripts = document.getElementsByTagName( "script" );
var script = scripts[ scripts.length - 1 ];
// Load the modules
var modules = script.getAttribute( "data-modules" );
if ( modules ) {
modules = modules.split( /\s+/ );
for ( var i = 0; i < modules.length; i++ ) {
includeStyle( "themes/base/" + modules[ i ] + ".css" );
}
}
// Load the QUnit stylesheet
includeStyle( "external/qunit/qunit.css" );
} )();