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
49abe3dc
Commit
49abe3dc
authored
Mar 04, 2013
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make data test titles more consistent and accurate
Signed-off-by:
Rick Waldron
<
waldron.rick@gmail.com
>
parent
692afbcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
data.js
test/unit/data.js
+7
-7
No files found.
test/unit/data.js
View file @
49abe3dc
...
@@ -469,7 +469,7 @@ if (window.JSON && window.JSON.stringify) {
...
@@ -469,7 +469,7 @@ if (window.JSON && window.JSON.stringify) {
});
});
}
}
test
(
"
jQuery
.data should follow html5 specification regarding camel casing"
,
function
()
{
test
(
".data should follow html5 specification regarding camel casing"
,
function
()
{
expect
(
12
);
expect
(
12
);
var
div
=
jQuery
(
"<div id='myObject' data-w-t-f='ftw' data-big-a-little-a='bouncing-b' data-foo='a' data-foo-bar='b' data-foo-bar-baz='c'></div>"
)
var
div
=
jQuery
(
"<div id='myObject' data-w-t-f='ftw' data-big-a-little-a='bouncing-b' data-foo='a' data-foo-bar='b' data-foo-bar-baz='c'></div>"
)
...
@@ -535,7 +535,7 @@ test(".data should not miss attr() set data-* with hyphenated property names", f
...
@@ -535,7 +535,7 @@ test(".data should not miss attr() set data-* with hyphenated property names", f
deepEqual
(
b
.
data
(
"long-param"
),
{
a
:
2
},
"data with property long-param was found, 2"
);
deepEqual
(
b
.
data
(
"long-param"
),
{
a
:
2
},
"data with property long-param was found, 2"
);
});
});
test
(
"
jQuery
.data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values"
,
function
()
{
test
(
".data supports interoperable hyphenated/camelCase get/set of properties with arbitrary non-null|NaN|undefined values"
,
function
()
{
var
div
=
jQuery
(
"<div/>"
,
{
id
:
"hyphened"
}).
appendTo
(
"#qunit-fixture"
),
var
div
=
jQuery
(
"<div/>"
,
{
id
:
"hyphened"
}).
appendTo
(
"#qunit-fixture"
),
datas
=
{
datas
=
{
...
@@ -566,7 +566,7 @@ test("jQuery.data supports interoperable hyphenated/camelCase get/set of propert
...
@@ -566,7 +566,7 @@ test("jQuery.data supports interoperable hyphenated/camelCase get/set of propert
});
});
});
});
test
(
"
jQuery
.data supports interoperable removal of hyphenated/camelCase properties"
,
function
()
{
test
(
".data supports interoperable removal of hyphenated/camelCase properties"
,
function
()
{
var
div
=
jQuery
(
"<div/>"
,
{
id
:
"hyphened"
}).
appendTo
(
"#qunit-fixture"
),
var
div
=
jQuery
(
"<div/>"
,
{
id
:
"hyphened"
}).
appendTo
(
"#qunit-fixture"
),
datas
=
{
datas
=
{
"non-empty"
:
"a string"
,
"non-empty"
:
"a string"
,
...
@@ -598,7 +598,7 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
...
@@ -598,7 +598,7 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
});
});
});
});
test
(
"
jQuery.fn
.removeData supports removal of hyphenated properties via array (#12786)"
,
function
(
assert
)
{
test
(
".removeData supports removal of hyphenated properties via array (#12786)"
,
function
(
assert
)
{
expect
(
4
);
expect
(
4
);
var
div
,
plain
,
compare
;
var
div
,
plain
,
compare
;
...
@@ -631,7 +631,7 @@ test( "jQuery.fn.removeData supports removal of hyphenated properties via array
...
@@ -631,7 +631,7 @@ test( "jQuery.fn.removeData supports removal of hyphenated properties via array
});
});
// Test originally by Moschel
// Test originally by Moschel
test
(
"
Triggering the
removeData should not throw exceptions. (#10080)"
,
function
()
{
test
(
"
.
removeData should not throw exceptions. (#10080)"
,
function
()
{
expect
(
1
);
expect
(
1
);
stop
();
stop
();
var
frame
=
jQuery
(
"#loadediframe"
);
var
frame
=
jQuery
(
"#loadediframe"
);
...
@@ -643,7 +643,7 @@ test("Triggering the removeData should not throw exceptions. (#10080)", function
...
@@ -643,7 +643,7 @@ test("Triggering the removeData should not throw exceptions. (#10080)", function
frame
.
attr
(
"src"
,
"data/iframe.html?param=true"
);
frame
.
attr
(
"src"
,
"data/iframe.html?param=true"
);
});
});
test
(
"
Only check element attributes once when calling .data() -
#8909"
,
function
()
{
test
(
"
.data only checks element attributes once.
#8909"
,
function
()
{
expect
(
2
);
expect
(
2
);
var
testing
=
{
var
testing
=
{
"test"
:
"testing"
,
"test"
:
"testing"
,
...
@@ -663,7 +663,7 @@ test( "Only check element attributes once when calling .data() - #8909", functio
...
@@ -663,7 +663,7 @@ test( "Only check element attributes once when calling .data() - #8909", functio
element
.
remove
();
element
.
remove
();
});
});
test
(
"
JSON data- attributes
can have newlines"
,
function
()
{
test
(
"
data-* with JSON value
can have newlines"
,
function
()
{
expect
(
1
);
expect
(
1
);
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>"
);
...
...
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