mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 07:25:15 +02:00
Split out and test Way
This commit is contained in:
@@ -14,10 +14,12 @@
|
||||
<script type="text/javascript" src="../js/lib/jshashtable.js"></script>
|
||||
<script type="text/javascript" src="../js/iD/Node.js"></script>
|
||||
<script type="text/javascript" src="../js/iD/Entity.js"></script>
|
||||
<script type="text/javascript" src="../js/iD/Way.js"></script>
|
||||
|
||||
<!-- include spec files here... -->
|
||||
<script type="text/javascript" src="spec/Node.js"></script>
|
||||
<script type="text/javascript" src="spec/Entity.js"></script>
|
||||
<script type="text/javascript" src="spec/Way.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
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.length()).toEqual(0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user