Commit 27e5052a authored by rwldrn's avatar rwldrn

Assert that .contents().hasClass() works as expected. Fixes #9630

parent 96501d38
...@@ -1055,3 +1055,13 @@ test("addClass, removeClass, hasClass", function() { ...@@ -1055,3 +1055,13 @@ test("addClass, removeClass, hasClass", function() {
jq.removeClass("class4"); jq.removeClass("class4");
ok( jq.hasClass("class4")==false, "Check the class has been properly removed" ); ok( jq.hasClass("class4")==false, "Check the class has been properly removed" );
}); });
test("contents().hasClass() returns correct values", function() {
expect(2);
var $div = jQuery("<div><span class='foo'></span><!-- comment -->text</div>"),
$contents = $div.contents();
ok( $contents.hasClass("foo"), "Found 'foo' in $contents" );
ok( $contents.hasClass("undefined"), "Did not find 'undefined' in $contents (correctly)" );
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment