Widget: Fix typos

Closes gh-1386
(cherry picked from commit 347b2a5ecd)
This commit is contained in:
Scott González 2014-11-10 08:08:07 -05:00
parent 9dd1e733f3
commit 28ab47ca6c

View File

@ -50,21 +50,21 @@ test( "element normalization", function() {
$.ui.testWidget.prototype.defaultElement = "<span data-test='pass'></span>"; $.ui.testWidget.prototype.defaultElement = "<span data-test='pass'></span>";
$.ui.testWidget.prototype._create = function() { $.ui.testWidget.prototype._create = function() {
ok( this.element.is( "span[data-test=pass]" ), "generated span with properties" ); ok( this.element.is( "span[data-test=pass]" ), "generated span with properties" );
deepEqual( this.element.testWidget( "instance" ), this, "instace stored in .data()" ); deepEqual( this.element.testWidget( "instance" ), this, "instance stored in .data()" );
}; };
$.ui.testWidget(); $.ui.testWidget();
elem = $( "<input>" ); elem = $( "<input>" );
$.ui.testWidget.prototype._create = function() { $.ui.testWidget.prototype._create = function() {
deepEqual( this.element[ 0 ], elem[ 0 ], "from element" ); deepEqual( this.element[ 0 ], elem[ 0 ], "from element" );
deepEqual( elem.testWidget( "instance" ), this, "instace stored in .data()" ); deepEqual( elem.testWidget( "instance" ), this, "instance stored in .data()" );
}; };
$.ui.testWidget( {}, elem[ 0 ] ); $.ui.testWidget( {}, elem[ 0 ] );
elem = $( "<div>" ); elem = $( "<div>" );
$.ui.testWidget.prototype._create = function() { $.ui.testWidget.prototype._create = function() {
deepEqual( this.element[ 0 ], elem[ 0 ], "from jQuery object" ); deepEqual( this.element[ 0 ], elem[ 0 ], "from jQuery object" );
deepEqual( elem.testWidget( "instance" ), this, "instace stored in .data()" ); deepEqual( elem.testWidget( "instance" ), this, "instance stored in .data()" );
}; };
$.ui.testWidget( {}, elem ); $.ui.testWidget( {}, elem );
@ -72,7 +72,7 @@ test( "element normalization", function() {
.appendTo( "#qunit-fixture" ); .appendTo( "#qunit-fixture" );
$.ui.testWidget.prototype._create = function() { $.ui.testWidget.prototype._create = function() {
deepEqual( this.element[ 0 ], elem[ 0 ], "from selector" ); deepEqual( this.element[ 0 ], elem[ 0 ], "from selector" );
deepEqual( elem.testWidget( "instance" ), this, "instace stored in .data()" ); deepEqual( elem.testWidget( "instance" ), this, "instance stored in .data()" );
}; };
$.ui.testWidget( {}, "#element-normalization-selector" ); $.ui.testWidget( {}, "#element-normalization-selector" );