Commit 2f4c228b authored by Mike Bostock's avatar Mike Bostock
Browse files

Simplify test.

parent 51d4d0ac
...@@ -120,13 +120,9 @@ suite.addBatch({ ...@@ -120,13 +120,9 @@ suite.addBatch({
return body; return body;
}, },
"inserts before the following updating sibling": function(body) { "inserts before the following updating sibling": function(body) {
body.selectAll("div").data(["peach", "apple", "banana", "orange", "apricot"]).enter().insert("div"); var data = ["peach", "apple", "banana", "orange", "apricot"];
var div = body.selectAll("div"); body.selectAll("div").data(data).enter().insert("div");
assert.equal(div[0][0].__data__, "peach"); assert.deepEqual(body.selectAll("div").data(), data);
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");
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment