toolkit/javascript/d3/test/geo/path-test.js
changeset 47 c0b4a8b5a012
equal deleted inserted replaced
46:efd9c589177a 47:c0b4a8b5a012
       
     1 require("../env");
       
     2 require("../../d3");
       
     3 require("../../d3.geo");
       
     4 
       
     5 var vows = require("vows"),
       
     6     assert = require("assert");
       
     7 
       
     8 var suite = vows.describe("d3.geo.path");
       
     9 
       
    10 suite.addBatch({
       
    11   "path": {
       
    12     topic: d3.geo.path,
       
    13     "Polygon": function(path) {
       
    14       assert.equal(path({
       
    15         type: "Feature",
       
    16         geometry: {
       
    17           type: "Polygon",
       
    18           coordinates: [[[-63.03, 18.02], [-63.14, 18.06], [-63.01, 18.07], [-63.03, 18.02]]]
       
    19         },
       
    20       }), "M984.5652086349427,468.99159422596244L981.8396467935554,467.9114977057422L985.0785139575695,467.688661596079Z");
       
    21     }
       
    22   }
       
    23 });
       
    24 
       
    25 suite.export(module);