Commit d7af3667 authored by Oleg Gaidarenko's avatar Oleg Gaidarenko

Tests: Add test for selectors with commas

parent 3115d4c9
...@@ -89,6 +89,18 @@ test("name", function() { ...@@ -89,6 +89,18 @@ test("name", function() {
form.remove(); form.remove();
}); });
test( "comma selectors", function() {
expect( 4 );
var fixture = jQuery( "<div><h2><span/></h2><div><p><span/></p><p/></div></div>" );
equal( fixture.find( "h2, div p" ).filter( "p" ).length, 2, "has to find two <p>" );
equal( fixture.find( "h2, div p" ).filter( "h2" ).length, 1, "has to find one <h2>" );
equal( fixture.find( "h2 , div p" ).filter( "p" ).length, 2, "has to find two <p>" );
equal( fixture.find( "h2 , div p" ).filter( "h2" ).length, 1, "has to find one <h2>" );
});
test("attributes - jQuery only", function() { test("attributes - jQuery only", function() {
expect( 5 ); expect( 5 );
......
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