]> source.dussan.org Git - jquery.git/commitdiff
the expected number of assertions shouldn't contain a condition
authorlouisremi <louisremi@louisremi-laptop.(none)>
Mon, 11 Apr 2011 19:14:41 +0000 (21:14 +0200)
committerlouisremi <louisremi@louisremi-laptop.(none)>
Mon, 11 Apr 2011 19:14:41 +0000 (21:14 +0200)
test/unit/css.js

index c85f432f2d9165e0bd60cd5714cf7fba99c41d01..c21beb8080990c24365472fef97e5cb2cc845086 100644 (file)
@@ -1,7 +1,7 @@
 module("css", { teardown: moduleTeardown });
 
 test("css(String|Hash)", function() {
-       expect( jQuery.support.opacity ? 41 : 42 );
+       expect( 42 );
 
        equals( jQuery('#main').css("display"), 'block', 'Check for css property "display"');
 
@@ -58,9 +58,9 @@ test("css(String|Hash)", function() {
        equals( jQuery('#empty').css('opacity'), '0', "Assert opacity is accessible via filter property set in stylesheet in IE" );
        jQuery('#empty').css({ opacity: '1' });
        equals( jQuery('#empty').css('opacity'), '1', "Assert opacity is taken from style attribute when set vs stylesheet in IE with filters" );
-       if ( !jQuery.support.opacity ) {
+       jQuery.support.opacity ?
+               ok(true, "Requires the same number of tests"):
                ok( ~jQuery('#empty')[0].currentStyle.filter.indexOf('gradient'), "Assert setting opacity doesn't overwrite other filters of the stylesheet in IE" );
-       }
 
        var div = jQuery('#nothiddendiv'), child = jQuery('#nothiddendivchild');