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
3ee332b2
Commit
3ee332b2
authored
May 28, 2012
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor test suite adjustments
parent
519b225a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
testinit.js
test/data/testinit.js
+13
-9
selector.js
test/unit/selector.js
+2
-1
No files found.
test/data/testinit.js
View file @
3ee332b2
...
...
@@ -24,30 +24,34 @@ define.amd = {
* @result [<div id="main">, <span id="foo">, <input id="bar">]
*/
function
q
()
{
var
r
=
[];
var
r
=
[],
i
=
0
;
for
(
var
i
=
0
;
i
<
arguments
.
length
;
i
++
)
{
for
(
;
i
<
arguments
.
length
;
i
++
)
{
r
.
push
(
document
.
getElementById
(
arguments
[
i
]
)
);
}
return
r
;
}
/**
* Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
* @param {String} a - Assertion name
* @param {String} b - Sizzle selector
* @param {String} c - Array of ids to construct what is expected
* @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
*/
function
t
(
a
,
b
,
c
)
{
var
f
=
jQuery
(
b
).
get
(),
s
=
""
;
function
t
(
a
,
b
,
c
)
{
var
f
=
jQuery
(
b
).
get
(),
s
=
""
,
i
=
0
;
for
(
var
i
=
0
;
i
<
f
.
length
;
i
++
)
{
s
+=
(
s
&&
","
)
+
'"'
+
f
[
i
].
id
+
'"'
;
for
(
;
i
<
f
.
length
;
i
++
)
{
s
+=
(
s
&&
","
)
+
'"'
+
f
[
i
].
id
+
'"'
;
}
deepEqual
(
f
,
q
.
apply
(
q
,
c
),
a
+
" ("
+
b
+
")"
);
deepEqual
(
f
,
q
.
apply
(
q
,
c
),
a
+
" ("
+
b
+
")"
);
}
var
createDashboardXML
=
function
()
{
var
string
=
'<?xml version="1.0" encoding="UTF-8"?>
\
<dashboard>
\
...
...
test/unit/selector.js
View file @
3ee332b2
...
...
@@ -75,7 +75,8 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue
}
/**
* Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
* Asserts that a select matches the given IDs
* @example t("Check for something", "//[a]", ["foo", "baar"]);
* @param {String} a - Assertion name
* @param {String} b - Sizzle selector
* @param {String} c - Array of ids to construct what is expected
...
...
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