Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MUR Drupal
d3-library
Commits
2f4c228b
Commit
2f4c228b
authored
Jul 02, 2013
by
Mike Bostock
Browse files
Simplify test.
parent
51d4d0ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/selection/insert-test.js
View file @
2f4c228b
...
...
@@ -120,13 +120,9 @@ suite.addBatch({
return
body
;
},
"
inserts before the following updating sibling
"
:
function
(
body
)
{
body
.
selectAll
(
"
div
"
).
data
([
"
peach
"
,
"
apple
"
,
"
banana
"
,
"
orange
"
,
"
apricot
"
]).
enter
().
insert
(
"
div
"
);
var
div
=
body
.
selectAll
(
"
div
"
);
assert
.
equal
(
div
[
0
][
0
].
__data__
,
"
peach
"
);
assert
.
equal
(
div
[
0
][
1
].
__data__
,
"
apple
"
);
assert
.
equal
(
div
[
0
][
2
].
__data__
,
"
banana
"
);
assert
.
equal
(
div
[
0
][
3
].
__data__
,
"
orange
"
);
assert
.
equal
(
div
[
0
][
4
].
__data__
,
"
apricot
"
);
var
data
=
[
"
peach
"
,
"
apple
"
,
"
banana
"
,
"
orange
"
,
"
apricot
"
];
body
.
selectAll
(
"
div
"
).
data
(
data
).
enter
().
insert
(
"
div
"
);
assert
.
deepEqual
(
body
.
selectAll
(
"
div
"
).
data
(),
data
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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