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
a7158fac
Commit
a7158fac
authored
Oct 24, 2012
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove .hyphen property from tests (left behind in refactoring)
parent
812c6087
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
data.js
test/unit/data.js
+3
-6
No files found.
test/unit/data.js
View file @
a7158fac
...
@@ -19,7 +19,7 @@ function dataTests (elem) {
...
@@ -19,7 +19,7 @@ function dataTests (elem) {
}
}
var
oldCacheLength
,
dataObj
,
internalDataObj
,
expected
,
actual
;
var
oldCacheLength
,
dataObj
,
internalDataObj
,
expected
,
actual
;
equal
(
jQuery
.
data
(
elem
,
"foo"
),
undefined
,
"No data exists initially"
);
equal
(
jQuery
.
data
(
elem
,
"foo"
),
undefined
,
"No data exists initially"
);
strictEqual
(
jQuery
.
hasData
(
elem
),
false
,
"jQuery.hasData agrees no data exists initially"
);
strictEqual
(
jQuery
.
hasData
(
elem
),
false
,
"jQuery.hasData agrees no data exists initially"
);
...
@@ -655,7 +655,7 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
...
@@ -655,7 +655,7 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
div
.
data
(
datas
);
div
.
data
(
datas
);
deepEqual
(
div
.
data
(),
datas
,
"div.data() returns an object whose values match those of datas (div)"
);
deepEqual
(
div
.
data
(),
datas
,
"div.data() returns an object whose values match those of datas (div)"
);
div
.
removeData
(
keys
.
hyphen
);
div
.
removeData
(
keys
);
ok
(
jQuery
.
isEmptyObject
(
div
.
data
()
),
"After removal by array of hyphenated keys, div.data() returns an object with no properties (div)"
);
ok
(
jQuery
.
isEmptyObject
(
div
.
data
()
),
"After removal by array of hyphenated keys, div.data() returns an object with no properties (div)"
);
div
.
data
(
"a-a"
,
1
);
div
.
data
(
"a-a"
,
1
);
...
@@ -665,7 +665,6 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
...
@@ -665,7 +665,6 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
deepEqual
(
div
.
data
(
"b-b"
),
2
,
"div.data('b-b') returns value that matches the manually set value (div)"
);
deepEqual
(
div
.
data
(
"b-b"
),
2
,
"div.data('b-b') returns value that matches the manually set value (div)"
);
div
.
removeData
([
"a-a"
,
"b-b"
]);
div
.
removeData
([
"a-a"
,
"b-b"
]);
ok
(
jQuery
.
isEmptyObject
(
div
.
data
()
),
"After removal by array of hyphenated keys, div.data() returns an object with no properties (div)"
);
ok
(
jQuery
.
isEmptyObject
(
div
.
data
()
),
"After removal by array of hyphenated keys, div.data() returns an object with no properties (div)"
);
plain
=
jQuery
({});
plain
=
jQuery
({});
...
@@ -674,7 +673,6 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
...
@@ -674,7 +673,6 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
deepEqual
(
plain
.
data
(),
datas
,
"plain.data() returns an object whose values match those of datas (plain)"
);
deepEqual
(
plain
.
data
(),
datas
,
"plain.data() returns an object whose values match those of datas (plain)"
);
plain
.
removeData
(
keys
);
plain
.
removeData
(
keys
);
ok
(
jQuery
.
isEmptyObject
(
plain
.
data
()
),
"After removal by array of hyphenated keys, plain.data() returns an object with no properties (plain)"
);
ok
(
jQuery
.
isEmptyObject
(
plain
.
data
()
),
"After removal by array of hyphenated keys, plain.data() returns an object with no properties (plain)"
);
...
@@ -687,7 +685,6 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
...
@@ -687,7 +685,6 @@ test( "jQuery.fn.removeData supports interoperable removal of hyphenated propert
deepEqual
(
plain
.
data
(
"b-b"
),
2
,
"plain.data('b-b') returns value that matches the manually set value (plain)"
);
deepEqual
(
plain
.
data
(
"b-b"
),
2
,
"plain.data('b-b') returns value that matches the manually set value (plain)"
);
plain
.
removeData
([
"a-a"
,
"b-b"
]);
plain
.
removeData
([
"a-a"
,
"b-b"
]);
ok
(
jQuery
.
isEmptyObject
(
plain
.
data
()
),
"After removal by array of hyphenated keys, plain.data() returns an object with no properties (plain)"
);
ok
(
jQuery
.
isEmptyObject
(
plain
.
data
()
),
"After removal by array of hyphenated keys, plain.data() returns an object with no properties (plain)"
);
});
});
...
@@ -730,4 +727,4 @@ test( "JSON data- attributes can have newlines", function() {
...
@@ -730,4 +727,4 @@ test( "JSON data- attributes can have newlines", function() {
var
x
=
jQuery
(
"<div data-some='{
\n\"
foo
\"
:
\n
\
t
\"
bar
\"\n
}'></div>"
);
var
x
=
jQuery
(
"<div data-some='{
\n\"
foo
\"
:
\n
\
t
\"
bar
\"\n
}'></div>"
);
equal
(
x
.
data
(
"some"
).
foo
,
"bar"
,
"got a JSON data- attribute with spaces"
);
equal
(
x
.
data
(
"some"
).
foo
,
"bar"
,
"got a JSON data- attribute with spaces"
);
x
.
remove
();
x
.
remove
();
});
});
\ No newline at end of file
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