Added new test suite for common tests across all UI plugins

This commit is contained in:
Richard Worth
2008-11-11 13:32:48 +00:00
parent 2afb5942aa
commit a08dfc9f6f
2 changed files with 79 additions and 0 deletions

38
tests/ui.js Normal file
View File

@@ -0,0 +1,38 @@
/*
* core unit tests
*/
(function($) {
var plugins = [
"accordion",
"colorpicker",
"datepicker",
"dialog",
"draggable",
"droppable",
"progressbar",
"resizable",
"selectable",
"slider",
"sortable",
"spinner",
"tabs"
];
module("version");
test("core", function() {
equals($.ui.version, "@VERSION", "$.ui.version");
});
$(plugins).each(function() {
var pluginName = this;
test(pluginName, function() {
if ($.ui[pluginName])
equals($.ui[pluginName].version, "@VERSION", "$.ui." + pluginName + ".version");
else
ok(false, "$.ui." + pluginName + " undefined.");
});
});
})(jQuery);