Files
iD/test/spec/Way.js
Tom MacWright 0a0b1749dc Move towards compatible with existing view/edit code. This throws no
errors, but does not yet draw.
2012-10-16 17:38:51 -04:00

28 lines
593 B
JavaScript

describe('Way', function() {
var way;
beforeEach(function() {
way = new iD.Way();
});
it('is a way', function() {
expect(way.entityType).toEqual('way');
});
it('has zero nodes by default', function() {
expect(way.nodes.length).toEqual(0);
});
it('is closed by default', function() {
expect(way.isClosed()).toEqual(true);
});
it('is a way when it has no nodes', function() {
expect(way.isType('way')).toEqual(true);
});
it('is also an area when it has no nodes', function() {
expect(way.isType('area')).toEqual(true);
});
});