Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
d7af3667
Commit
d7af3667
authored
Feb 26, 2014
by
Oleg Gaidarenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: Add test for selectors with commas
parent
3115d4c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
selector.js
test/unit/selector.js
+12
-0
No files found.
test/unit/selector.js
View file @
d7af3667
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment