diff --git a/test/transition/size-test.js b/test/transition/size-test.js index 1aca51f..eb18b18 100644 --- a/test/transition/size-test.js +++ b/test/transition/size-test.js @@ -1,4 +1,5 @@ var tape = require("tape"), + jsdom = require("../jsdom"), d3_selection = require("d3-selection"), d3_transition = require("../../"); @@ -6,3 +7,10 @@ tape("transition.size is the same as selection.size", function(test) { test.equal(d3_transition.transition.prototype.size, d3_selection.selection.prototype.size); test.end(); }); + +tape("transition.size() returns the expected value", function(test) { + var root = jsdom().documentElement; + test.equal(d3_selection.select(root).transition().size(), 1); + test.equal(d3_selection.selectAll([null, root]).transition().size(), 1); + test.end(); +});