Commit 05e9f190 authored by Mike Bostock's avatar Mike Bostock
Browse files

Fix all the tests.

parent a4fed02b
......@@ -36,8 +36,10 @@ module.exports = function() {
document: document,
window: document.createWindow(),
setTimeout: setTimeout,
clearTimeout: clearTimeout
clearTimeout: clearTimeout,
Date: Date // so we can override Date.now in tests
};
return topic;
};
......
......@@ -145,7 +145,7 @@ module.exports = {
// different tests at the same time!
"sequenced": {
topic: function(result) {
topic: function(result, d3) {
var cb = this.callback,
node = result.selection[0][0],
id = result.id;
......
var assert = require("../assert");
module.exports = {
topic: function(d3) {
return d3; // bug in vows where topic is not propagated automatically
},
"on a new transition": {
topic: function(d3) {
return d3.select("body").append("div").transition();
......@@ -11,7 +14,7 @@ module.exports = {
assert.equal(~~id, id);
}
},
"increases monotonically across transitions": function(transition) {
"increases monotonically across transitions": function(d3) {
var t0 = d3.select("body").append("div").transition(),
t1 = d3.select("body").append("div").transition();
assert.isTrue(t1.id > t0.id);
......
var assert = require("../assert");
module.exports = {
topic: function(d3) {
return d3; // bug in vows where topic is not propagated automatically
},
"on a new transition": {
topic: function(d3) {
return d3.select("body").append("div").transition();
......
......@@ -61,16 +61,16 @@ suite.addBatch({
}
});
// // Control
// suite.addBatch({
// "transition": {
// topic: load("transition/transition").document(),
// "each": require("./transition-test-each"),
// "call": require("./transition-test-call"),
// "tween": require("./transition-test-tween"),
// "id": require("./transition-test-id"),
// "time": require("./transition-test-time")
// }
// });
// Control
suite.addBatch({
"transition": {
topic: load("transition/transition").document(),
"each": require("./transition-test-each"),
"call": require("./transition-test-call"),
"tween": require("./transition-test-tween"),
"id": require("./transition-test-id"),
"time": require("./transition-test-time")
}
});
suite.export(module);
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