Silence bogus test failures.
This commit is contained in:
Родитель
4a9a9cad0b
Коммит
1c529da03e
|
@ -1,4 +1,7 @@
|
|||
// TODO fallback for projections that don't implement point, polygon? (or fix albersUsa?)
|
||||
// TODO fallback for projections that don't implement stream? (or fix albersUsa?)
|
||||
// TODO cache pathBuffer / pathContext across invocations?
|
||||
// TODO better encapsulation for d3_geo_pathArea; move to area.js
|
||||
// TODO better encapsulation for d3_geo_pathCentroid; move to centroid.js
|
||||
|
||||
d3.geo.path = function() {
|
||||
var pointRadius = 4.5,
|
||||
|
|
|
@ -89,20 +89,24 @@ suite.addBatch({
|
|||
]);
|
||||
},
|
||||
|
||||
"returns null when passed null or undefined": function(path) {
|
||||
assert.isNull(path(null));
|
||||
assert.isNull(path(undefined));
|
||||
assert.isNull(path());
|
||||
"with no context": {
|
||||
topic: function(path) {
|
||||
return d3.geo.path().projection(path.projection());
|
||||
},
|
||||
|
||||
"bogus type name": function(path) {
|
||||
assert.isNull(path({
|
||||
"returns null when passed null or undefined": function(path) {
|
||||
assert.equal(path(null), null);
|
||||
assert.equal(path(undefined), null);
|
||||
assert.equal(path(), null);
|
||||
},
|
||||
"returns null with bogus type name": function(path) {
|
||||
assert.equal(path({
|
||||
type: "Feature",
|
||||
geometry: {
|
||||
type: "__proto__",
|
||||
coordinates: [[[-63.03, 18.02], [-63.14, 18.06], [-63.01, 18.07], [-63.03, 18.02]]]
|
||||
},
|
||||
}));
|
||||
}), null);
|
||||
}
|
||||
},
|
||||
|
||||
"projection": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче