aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2013-07-31 15:56:04 -0400
committerScott González <scott.gonzalez@gmail.com>2013-07-31 16:52:21 -0400
commitc0ab71056b936627e8a7821f03c044aec6280a40 (patch)
treed4a5940aad9675f737b7eeb52b7c63b5ab39f38b /tests
parentc4c90f385a77ab106a47cf56e53bcd352aa9edce (diff)
downloadjquery-ui-c0ab71056b936627e8a7821f03c044aec6280a40.tar.gz
jquery-ui-c0ab71056b936627e8a7821f03c044aec6280a40.zip
Widget Factory: Make $.widget return the constructor. Fixes #9467 - Widget factory: Return the constructor from $.widget().
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/widget/widget_core.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index 3268b756d..aff07cc35 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -615,12 +615,13 @@ test( ".disable()", function() {
});
test( ".widget() - base", function() {
- expect( 1 );
- $.widget( "ui.testWidget", {
+ expect( 2 );
+ var constructor = $.widget( "ui.testWidget", {
_create: function() {}
});
var div = $( "<div>" ).testWidget();
deepEqual( div[0], div.testWidget( "widget" )[0]);
+ deepEqual( constructor, $.ui.testWidget, "$.widget returns the constructor" );
});
test( ".widget() - overriden", function() {