aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/testsuite.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-06-27 11:32:48 -0400
committerScott González <scott.gonzalez@gmail.com>2012-06-27 11:32:48 -0400
commit5ae668fdb61dd5e516dc599166a31fd46a916bfd (patch)
tree002c635b5410177d4de10c2288230fdd0bbcdbab /tests/unit/testsuite.js
parent9b6c1c5cdb18d76d9febfc079a1cc439dc3789b3 (diff)
downloadjquery-ui-5ae668fdb61dd5e516dc599166a31fd46a916bfd.tar.gz
jquery-ui-5ae668fdb61dd5e516dc599166a31fd46a916bfd.zip
Tests: Enable QUnit.config.requireExpects.
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r--tests/unit/testsuite.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js
index e4f549de6..99694a83e 100644
--- a/tests/unit/testsuite.js
+++ b/tests/unit/testsuite.js
@@ -10,6 +10,8 @@ function includeScript( url ) {
document.write( "<script src='../../../" + url + "'></script>" );
}
+QUnit.config.requireExpects = true;
+
QUnit.config.urlConfig.push( "min" );
TestHelpers.loadResources = QUnit.urlParams.min ?
function() {
@@ -76,7 +78,9 @@ function testWidgetDefaults( widget, defaults ) {
// ensure that all defaults have the correct value
test( "defined defaults", function() {
+ var count = 0;
$.each( defaults, function( key, val ) {
+ expect( ++count );
if ( $.isFunction( val ) ) {
ok( $.isFunction( pluginDefaults[ key ] ), key );
return;
@@ -87,7 +91,9 @@ function testWidgetDefaults( widget, defaults ) {
// ensure that all defaults were tested
test( "tested defaults", function() {
+ var count = 0;
$.each( pluginDefaults, function( key, val ) {
+ expect( ++count );
ok( key in defaults, key );
});
});
@@ -96,6 +102,7 @@ function testWidgetDefaults( widget, defaults ) {
function testWidgetOverrides( widget ) {
if ( $.uiBackCompat === false ) {
test( "$.widget overrides", function() {
+ expect( 4 );
$.each([
"_createWidget",
"destroy",
@@ -111,6 +118,8 @@ function testWidgetOverrides( widget ) {
function testBasicUsage( widget ) {
test( "basic usage", function() {
+ expect( 3 );
+
var defaultElement = $.ui[ widget ].prototype.defaultElement;
$( defaultElement ).appendTo( "body" )[ widget ]().remove();
ok( true, "initialized on element" );
@@ -131,6 +140,7 @@ TestHelpers.commonWidgetTests = function( widget, settings ) {
testWidgetOverrides( widget );
testBasicUsage( widget );
test( "version", function() {
+ expect( 1 );
ok( "version" in $.ui[ widget ].prototype, "version property exists" );
});
};