mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-30 19:04:43 +00:00
moved the widget tests back under an immediate function
This commit is contained in:
parent
3316e559b3
commit
ff23f63881
1 changed files with 24 additions and 23 deletions
|
|
@ -1,32 +1,33 @@
|
|||
/*
|
||||
* mobile widget unit tests
|
||||
*/
|
||||
(function($){
|
||||
module('jquery.mobile.widget.js');
|
||||
|
||||
module('jquery.mobile.widget.js');
|
||||
test( "getting data from creation options", function(){
|
||||
var expected = "bizzle";
|
||||
|
||||
test( "getting data from creation options", function(){
|
||||
var expected = "bizzle";
|
||||
$.mobile.widget.prototype.options = { "fooBar" : true };
|
||||
$.mobile.widget.prototype.element = $("<div data-foo-bar=" + expected + ">");
|
||||
same($.mobile.widget.prototype._getCreateOptions()["fooBar"],
|
||||
expected);
|
||||
});
|
||||
|
||||
$.mobile.widget.prototype.options = { "fooBar" : true };
|
||||
$.mobile.widget.prototype.element = $("<div data-foo-bar=" + expected + ">");
|
||||
same($.mobile.widget.prototype._getCreateOptions()["fooBar"],
|
||||
expected);
|
||||
});
|
||||
test( "getting no data when the options are empty", function(){
|
||||
var expected = {};
|
||||
|
||||
test( "getting no data when the options are empty", function(){
|
||||
var expected = {};
|
||||
$.mobile.widget.prototype.options = {};
|
||||
$.mobile.widget.prototype.element = $("<div data-foo-bar=" + expected + ">");
|
||||
same($.mobile.widget.prototype._getCreateOptions(),
|
||||
expected);
|
||||
});
|
||||
|
||||
$.mobile.widget.prototype.options = {};
|
||||
$.mobile.widget.prototype.element = $("<div data-foo-bar=" + expected + ">");
|
||||
same($.mobile.widget.prototype._getCreateOptions(),
|
||||
expected);
|
||||
});
|
||||
test( "getting no data when the element has none", function(){
|
||||
var expected = {};
|
||||
|
||||
test( "getting no data when the element has none", function(){
|
||||
var expected = {};
|
||||
|
||||
$.mobile.widget.prototype.options = { "fooBar" : true };
|
||||
$.mobile.widget.prototype.element = $("<div>");
|
||||
same($.mobile.widget.prototype._getCreateOptions(),
|
||||
expected);
|
||||
});
|
||||
$.mobile.widget.prototype.options = { "fooBar" : true };
|
||||
$.mobile.widget.prototype.element = $("<div>");
|
||||
same($.mobile.widget.prototype._getCreateOptions(),
|
||||
expected);
|
||||
});
|
||||
})(jQuery);
|
||||
Loading…
Reference in a new issue