<meta charset="utf-8">
<title>jQuery UI Widget Test Suite</title>
- <script src="../../jquery.js"></script>
- <link rel="stylesheet" href="../../../external/qunit/qunit.css">
- <script src="../../../external/qunit/qunit.js"></script>
- <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
- <script src="../testsuite.js"></script>
- <script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
- <script>
- TestHelpers.loadResources({
- css: [ "core" ],
- js: [
- "ui/widget.js"
- ]
- });
+ <script src="../../lib/css.js" data-modules="core"></script>
+ <script src="../../lib/bootstrap.js"
+ data-modules="
+ widget_core
+ widget_extend
+ widget_animation
+ widget_classes
+ ">
</script>
-
- <script src="widget_core.js"></script>
- <script src="widget_extend.js"></script>
- <script src="widget_animation.js"></script>
- <script src="widget_classes.js"></script>
-
- <script src="../swarminject.js"></script>
</head>
<body>
+define( [
+ "jquery",
+ "ui/widget"
+], function( $ ) {
module( "widget animation", (function() {
var show = $.fn.show,
next();
});
});
+
+} );
-(function( $ ) {
+define( [
+ "jquery",
+ "ui/widget"
+], function( $ ) {
module( "widget factory classes", {
setup: function() {
"Appending a class to the current value works as expected" );
});
-test( ".destroy() - class removal", function() {
+test( ".destroy() - class removal", function( assert ) {
expect( 1 );
- domEqual( "#widget", function() {
+ assert.domEqual( "#widget", function() {
$( "#widget" ).classesWidget().classesWidget( "destroy" );
});
});
elementLacksClasses( widget, "remove", assert );
});
-}( jQuery ) );
+} );
-(function( $ ) {
+define( [
+ "jquery",
+ "lib/common",
+ "ui/widget"
+], function( $, common ) {
module( "widget factory", {
teardown: function() {
}
});
-TestHelpers.testJshint( "widget" );
+common.testJshint( "widget" );
test( "widget creation", function() {
expect( 5 );
equal( typeof instance, "object", "instance stored in .data(widgetFullName)" );
});
-}( jQuery ) );
+} );
-(function( $ ) {
+define( [
+ "jquery",
+ "ui/widget"
+], function( $ ) {
test( "$.widget.extend()", function() {
expect( 27 );
deepEqual( input, output, "don't clone arrays" );
});
-}( jQuery ));
+} );