mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 01:33:03 +00:00
10 lines
397 B
JavaScript
10 lines
397 B
JavaScript
describe("iD.actions.ReverseWay", function () {
|
|
it("reverses the order of nodes in the way", function () {
|
|
var node1 = iD.Node(),
|
|
node2 = iD.Node(),
|
|
way = iD.Way({nodes: [node1.id, node2.id]}),
|
|
graph = iD.actions.ReverseWay(way.id)(iD.Graph([node1, node2, way]));
|
|
expect(graph.entity(way.id).nodes).to.eql([node2.id, node1.id]);
|
|
});
|
|
});
|