mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
22 lines
526 B
JavaScript
22 lines
526 B
JavaScript
describe('Node', function() {
|
|
var node;
|
|
|
|
beforeEach(function() {
|
|
node = new iD.Node(10, 38, -77);
|
|
});
|
|
|
|
it('is a node entity', function() {
|
|
expect(node.type).toEqual('node');
|
|
});
|
|
|
|
it('should be initialized with a proper ID, lat, and lon', function() {
|
|
expect(node.id).toEqual(10);
|
|
expect(node.lat).toEqual(38);
|
|
expect(node.lon).toEqual(-77);
|
|
});
|
|
|
|
it('knows if it is within a bounding box', function() {
|
|
expect(node.intersects([[-90, 90], [90, -90]])).toBeTruthy();
|
|
});
|
|
});
|