module( "core - jQuery extensions" );
+TestHelpers.testJshint( "ui.core" );
+
test( "focus - original functionality", function() {
expect( 1 );
$( "#inputTabindex0" )
$.each( $.effects.effect, function( effect ) {
+ module( "effects." + effect );
+
+ // puff and size are defined inside scale
+ if ( effect !== "puff" && effect !== "size" ) {
+ TestHelpers.testJshint( "effects." + effect );
+ }
+
if ( effect === "transfer" ) {
return;
}
- module( "effect."+effect );
asyncTest( "show/hide", function() {
expect( 8 );
var hidden = $( "div.hidden" ),
};
QUnit.config.urlConfig.push( "nojshint" );
-function testJshint( widget ) {
+var jshintLoaded = false;
+TestHelpers.testJshint = function( module ) {
if ( QUnit.urlParams.nojshint ) {
return;
}
- includeScript( "external/jshint.js" );
+ if ( !jshintLoaded ) {
+ includeScript( "external/jshint.js" );
+ jshintLoaded = true;
+ }
+
asyncTest( "JSHint", function() {
expect( 1 );
dataType: "json"
}),
$.ajax({
- url: "../../../ui/jquery.ui." + widget + ".js",
+ url: "../../../ui/jquery." + module + ".js",
dataType: "text"
})
).done(function( hintArgs, srcArgs ) {
TestHelpers.commonWidgetTests = function( widget, settings ) {
module( widget + ": common widget" );
- testJshint( widget );
+ TestHelpers.testJshint( "ui." + widget );
testWidgetDefaults( widget, settings.defaults );
testWidgetOverrides( widget );
testBasicUsage( widget );
module( "widget factory", {
teardown: function() {
- delete $.ui.testWidget;
+ if ( $.ui ) {
+ delete $.ui.testWidget;
+ }
}
});
+TestHelpers.testJshint( "ui.widget" );
+
test( "widget creation", function() {
var myPrototype = {
_create: function() {},