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
ebbbe965
Commit
ebbbe965
authored
Feb 18, 2014
by
Oleg Gaidarenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: Correct logic of a broken assertion
parent
9d79b998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
attributes.js
test/unit/attributes.js
+3
-2
No files found.
test/unit/attributes.js
View file @
ebbbe965
...
@@ -374,8 +374,6 @@ test( "attr(String, Object)", function() {
...
@@ -374,8 +374,6 @@ test( "attr(String, Object)", function() {
strictEqual
(
$elem
.
attr
(
"nonexisting"
),
undefined
,
"attr(name, value) works correctly on comment and text nodes (bug #7500)."
);
strictEqual
(
$elem
.
attr
(
"nonexisting"
),
undefined
,
"attr(name, value) works correctly on comment and text nodes (bug #7500)."
);
});
});
// Register the property name to avoid generating a new global when testing window
Globals
.
register
(
"nonexisting"
);
jQuery
.
each
(
[
window
,
document
,
obj
,
"#firstp"
],
function
(
i
,
elem
)
{
jQuery
.
each
(
[
window
,
document
,
obj
,
"#firstp"
],
function
(
i
,
elem
)
{
var
oldVal
=
elem
.
nonexisting
,
var
oldVal
=
elem
.
nonexisting
,
$elem
=
jQuery
(
elem
);
$elem
=
jQuery
(
elem
);
...
@@ -384,6 +382,9 @@ test( "attr(String, Object)", function() {
...
@@ -384,6 +382,9 @@ test( "attr(String, Object)", function() {
elem
.
nonexisting
=
oldVal
;
elem
.
nonexisting
=
oldVal
;
});
});
// Register the property on the window for the previous assertion so it will be clean up
Globals
.
register
(
"nonexisting"
);
table
=
jQuery
(
"#table"
).
append
(
"<tr><td>cell</td></tr><tr><td>cell</td><td>cell</td></tr><tr><td>cell</td><td>cell</td></tr>"
);
table
=
jQuery
(
"#table"
).
append
(
"<tr><td>cell</td></tr><tr><td>cell</td><td>cell</td></tr><tr><td>cell</td><td>cell</td></tr>"
);
td
=
table
.
find
(
"td"
).
eq
(
0
);
td
=
table
.
find
(
"td"
).
eq
(
0
);
td
.
attr
(
"rowspan"
,
"2"
);
td
.
attr
(
"rowspan"
,
"2"
);
...
...
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