diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2013-07-31 15:56:04 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-07-31 16:52:21 -0400 |
commit | c0ab71056b936627e8a7821f03c044aec6280a40 (patch) | |
tree | d4a5940aad9675f737b7eeb52b7c63b5ab39f38b /tests | |
parent | c4c90f385a77ab106a47cf56e53bcd352aa9edce (diff) | |
download | jquery-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.js | 5 |
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() { |