Skip to content

Commit

Permalink
Update JSDOM and Vows versions.
Browse files Browse the repository at this point in the history
This required changing assert.length to assert.lengthOf in tests, due to
a Vows.js change to be compatible with Node.js v0.6.x.  For further
details:

    vowsjs/vows#141
  • Loading branch information
jasondavies committed Nov 9, 2011
1 parent af5fccd commit 4d6b5bc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"main": "d3.js",
"dependencies": {
"uglify-js": "1.1.1",
"jsdom": "0.2.8",
"vows": "0.5.11"
"jsdom": "0.2.9",
"vows": "0.5.13"
}
}
4 changes: 2 additions & 2 deletions src/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require("util").puts(JSON.stringify({
"main": "d3.js",
"dependencies": {
"uglify-js": "1.1.1",
"jsdom": "0.2.8",
"vows": "0.5.11"
"jsdom": "0.2.9",
"vows": "0.5.13"
}
}, null, 2));
4 changes: 2 additions & 2 deletions test/core/select-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ suite.addBatch({
"selects by node": function() {
var div = d3.select(document.body.lastChild);
assert.isTrue(div[0][0] === document.body.lastChild);
assert.length(div, 1);
assert.length(div[0], 1);
assert.lengthOf(div, 1);
assert.lengthOf(div[0], 1);
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions test/core/selectAll-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ suite.addBatch({
"selects by array": function() {
var div = d3.selectAll([document.body.lastChild]);
assert.isTrue(div[0][0] === document.body.lastChild);
assert.length(div, 1);
assert.length(div[0], 1);
assert.lengthOf(div, 1);
assert.lengthOf(div[0], 1);
},
"groups are not instances of NodeList": function() {
var div = d3.select("body").selectAll(function() { return this.getElementsByClassName("div"); });
Expand Down
6 changes: 3 additions & 3 deletions test/scale/category-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function category(category, n) {
return {
"is an ordinal scale": function() {
var x = category(), colors = x.range();
assert.length(x.domain(), 0);
assert.length(x.range(), n);
assert.lengthOf(x.domain(), 0);
assert.lengthOf(x.range(), n);
assert.equal(x(1), colors[0]);
assert.equal(x(2), colors[1]);
assert.equal(x(1), colors[0]);
Expand All @@ -39,7 +39,7 @@ function category(category, n) {
},
"contains the expected number of values in the range": function() {
var x = category();
assert.length(x.range(), n);
assert.lengthOf(x.range(), n);
},
"each range value is distinct": function() {
var map = {}, count = 0, x = category();
Expand Down

0 comments on commit 4d6b5bc

Please sign in to comment.