Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
const circle = d3.select('circle');
function transition(radius, duration) {
circle.transition()
.duration(duration)
.attr('r', radius);
}
describe('#transition', () => {
it('correctly transitions circle radius', () => {
transition(50, 1000);
D3TestUtils.clockTick(1000);
assert.strictEqual(circle.attr('r'), '50');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment