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
8e40a84c
Commit
8e40a84c
authored
Feb 15, 2011
by
Anton M
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some unscoped tests which failed after recent changes to QUnit.
parent
2cc03a86
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
core.js
test/unit/core.js
+5
-5
event.js
test/unit/event.js
+1
-1
traversing.js
test/unit/traversing.js
+3
-3
No files found.
test/unit/core.js
View file @
8e40a84c
...
...
@@ -537,29 +537,29 @@ test("end()", function() {
test
(
"length"
,
function
()
{
expect
(
1
);
equals
(
jQuery
(
"p"
).
length
,
6
,
"Get Number of Elements Found"
);
equals
(
jQuery
(
"
#main
p"
).
length
,
6
,
"Get Number of Elements Found"
);
});
test
(
"size()"
,
function
()
{
expect
(
1
);
equals
(
jQuery
(
"p"
).
size
(),
6
,
"Get Number of Elements Found"
);
equals
(
jQuery
(
"
#main
p"
).
size
(),
6
,
"Get Number of Elements Found"
);
});
test
(
"get()"
,
function
()
{
expect
(
1
);
same
(
jQuery
(
"p"
).
get
(),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Get All Elements"
);
same
(
jQuery
(
"
#main
p"
).
get
(),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Get All Elements"
);
});
test
(
"toArray()"
,
function
()
{
expect
(
1
);
same
(
jQuery
(
"p"
).
toArray
(),
same
(
jQuery
(
"
#main
p"
).
toArray
(),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Convert jQuery object to an Array"
);
});
test
(
"get(Number)"
,
function
()
{
expect
(
2
);
equals
(
jQuery
(
"p"
).
get
(
0
),
document
.
getElementById
(
"firstp"
),
"Get A Single Element"
);
equals
(
jQuery
(
"
#main
p"
).
get
(
0
),
document
.
getElementById
(
"firstp"
),
"Get A Single Element"
);
strictEqual
(
jQuery
(
"#firstp"
).
get
(
1
),
undefined
,
"Try get with index larger elements count"
);
});
...
...
test/unit/event.js
View file @
8e40a84c
...
...
@@ -409,7 +409,7 @@ test("bind(), namespaced events, cloned events", 18, function() {
}).
trigger
(
"tester"
);
// Make sure events stick with appendTo'd elements (which are cloned) #2027
jQuery
(
"<a href='#fail' class='test'>test</a>"
).
click
(
function
(){
return
false
;
}).
appendTo
(
"
p
"
);
jQuery
(
"<a href='#fail' class='test'>test</a>"
).
click
(
function
(){
return
false
;
}).
appendTo
(
"
#main
"
);
ok
(
jQuery
(
"a.test:first"
).
triggerHandler
(
"click"
)
===
false
,
"Handler is bound to appendTo'd elements"
);
});
...
...
test/unit/traversing.js
View file @
8e40a84c
...
...
@@ -97,9 +97,9 @@ test("filter(Selector)", function() {
test
(
"filter(Function)"
,
function
()
{
expect
(
2
);
same
(
jQuery
(
"p"
).
filter
(
function
()
{
return
!
jQuery
(
"a"
,
this
).
length
}).
get
(),
q
(
"sndp"
,
"first"
),
"filter(Function)"
);
same
(
jQuery
(
"
#main
p"
).
filter
(
function
()
{
return
!
jQuery
(
"a"
,
this
).
length
}).
get
(),
q
(
"sndp"
,
"first"
),
"filter(Function)"
);
same
(
jQuery
(
"p"
).
filter
(
function
(
i
,
elem
)
{
return
!
jQuery
(
"a"
,
elem
).
length
}).
get
(),
q
(
"sndp"
,
"first"
),
"filter(Function) using arg"
);
same
(
jQuery
(
"
#main
p"
).
filter
(
function
(
i
,
elem
)
{
return
!
jQuery
(
"a"
,
elem
).
length
}).
get
(),
q
(
"sndp"
,
"first"
),
"filter(Function) using arg"
);
});
test
(
"filter(Element)"
,
function
()
{
...
...
@@ -178,7 +178,7 @@ test("not(Element)", function() {
});
test
(
"not(Function)"
,
function
()
{
same
(
jQuery
(
"p"
).
not
(
function
()
{
return
jQuery
(
"a"
,
this
).
length
}).
get
(),
q
(
"sndp"
,
"first"
),
"not(Function)"
);
same
(
jQuery
(
"
#main
p"
).
not
(
function
()
{
return
jQuery
(
"a"
,
this
).
length
}).
get
(),
q
(
"sndp"
,
"first"
),
"not(Function)"
);
});
test
(
"not(Array)"
,
function
()
{
...
...
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