mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 09:42:56 +00:00
21 lines
664 B
JavaScript
21 lines
664 B
JavaScript
describe("iD.svg.Points", function () {
|
|
var surface,
|
|
projection = Object,
|
|
context;
|
|
|
|
beforeEach(function () {
|
|
context = iD().presets(iD.data.presets);
|
|
surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))
|
|
.call(iD.svg.Surface(context));
|
|
});
|
|
|
|
it("adds tag classes", function () {
|
|
var point = iD.Node({tags: {amenity: "cafe"}, loc: [0, 0]});
|
|
|
|
surface.call(iD.svg.Points(projection, context), [point]);
|
|
|
|
expect(surface.select('.point')).to.be.classed('tag-amenity');
|
|
expect(surface.select('.point')).to.be.classed('tag-amenity-cafe');
|
|
});
|
|
});
|