mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Fix tests
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset='utf-8'>
|
||||
<title>Mocha Tests</title>
|
||||
<link rel="stylesheet" href="lib/mocha.css">
|
||||
<link rel="stylesheet" href="../css/maki.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta charset='utf-8'>
|
||||
<title>Mocha Tests</title>
|
||||
<link rel="stylesheet" href="lib/mocha.css">
|
||||
<link rel="stylesheet" href="../css/maki.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
describe("iD.svg.Points", function () {
|
||||
var surface,
|
||||
projection = Object,
|
||||
filter = d3.functor(true);
|
||||
filter = d3.functor(true),
|
||||
context;
|
||||
|
||||
beforeEach(function () {
|
||||
context = iD();
|
||||
surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))
|
||||
.call(iD.svg.Surface());
|
||||
});
|
||||
@@ -12,7 +14,7 @@ describe("iD.svg.Points", function () {
|
||||
var node = iD.Node({tags: {amenity: "cafe"}, loc: [0, 0], _poi: true}),
|
||||
graph = iD.Graph([node]);
|
||||
|
||||
surface.call(iD.svg.Points(projection), graph, [node], filter);
|
||||
surface.call(iD.svg.Points(projection, context), graph, [node], filter);
|
||||
|
||||
expect(surface.select('.point')).to.be.classed('tag-amenity');
|
||||
expect(surface.select('.point')).to.be.classed('tag-amenity-cafe');
|
||||
|
||||
Reference in New Issue
Block a user