Skip to content

Commit

Permalink
Remove duplicate expect. Add QUnit.config.requireExpects to testrunne…
Browse files Browse the repository at this point in the history
…r.js QUnit configurations.
  • Loading branch information
rwaldron committed Oct 15, 2012
1 parent 0c44743 commit 611d766
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/data/testrunner.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ function testSubproject( label, url, risTests ) {
// and start()'s the next test. // and start()'s the next test.
QUnit.config.testTimeout = 20 * 1000; // 20 seconds QUnit.config.testTimeout = 20 * 1000; // 20 seconds


// Enforce an "expect" argument or expect() call in all test bodies.
QUnit.config.requireExpects = true;

/** /**
* Load the TestSwarm listener if swarmURL is in the address. * Load the TestSwarm listener if swarmURL is in the address.
*/ */
Expand Down
4 changes: 2 additions & 2 deletions test/unit/css.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ if ( jQuery.fn.offset ) {
}); });
} }


test("Do not append px to 'fill-opacity' #9548", 1, function() { test("Do not append px to 'fill-opacity' #9548", function() {
expect( 1 ); expect( 1 );


var $div = jQuery("<div>").appendTo("#qunit-fixture").css("fill-opacity", 1); var $div = jQuery("<div>").appendTo("#qunit-fixture").css("fill-opacity", 1);
Expand All @@ -791,7 +791,7 @@ test("Do not append px to 'fill-opacity' #9548", 1, function() {


test("css('width') and css('height') should respect box-sizing, see #11004", function() { test("css('width') and css('height') should respect box-sizing, see #11004", function() {
expect( 4 ); expect( 4 );

var el_dis = jQuery("<div style='width:300px;height:300px;margin:2px;padding:2px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>"), var el_dis = jQuery("<div style='width:300px;height:300px;margin:2px;padding:2px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;'>test</div>"),
el = el_dis.clone().appendTo("#qunit-fixture"); el = el_dis.clone().appendTo("#qunit-fixture");


Expand Down

1 comment on commit 611d766

@Krinkle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit introduced errors IE6-8 (some were already fixed since then, but the following is still happening):

support:
Expected 1 assertions, but 30 were run 

Please sign in to comment.