@@ -31,7 +31,7 @@ test('Test combining 2 ways 1->2', () => {
3131 let xml3 = parser . parseFromString ( way3 , 'text/xml' ) . getElementsByTagName ( 'way' ) [ 0 ] ;
3232 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
3333 expect ( result . length ) . toBe ( 1 ) ;
34- expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
34+ expect ( BuildingShapeUtils . isClosed ( result [ 0 ] ) ) ;
3535 // expect 4 nodes
3636} ) ;
3737
@@ -45,7 +45,7 @@ test('Test combining 3 ways 2->1->3', () => {
4545 let xml3 = parser . parseFromString ( way3 , 'text/xml' ) . getElementsByTagName ( 'way' ) [ 0 ] ;
4646 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
4747 expect ( result . length ) . toBe ( 1 ) ;
48- expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
48+ expect ( BuildingShapeUtils . isClosed ( result [ 0 ] ) ) ;
4949 // expect 4 nodes
5050 // expect result to contain nodes 1, 2 and 3.
5151} ) ;
@@ -60,7 +60,7 @@ test('Test combining 2 unaligned ways', () => {
6060 let xml3 = parser . parseFromString ( way3 , 'text/xml' ) . getElementsByTagName ( 'way' ) [ 0 ] ;
6161 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
6262 expect ( result . length ) . toBe ( 1 ) ;
63- expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
63+ expect ( BuildingShapeUtils . isClosed ( result [ 0 ] ) ) ;
6464 // expect 4 nodes
6565 // expect result to contain nodes 1, 2 and 3.
6666} ) ;
@@ -76,7 +76,7 @@ test('Test combining 3 ways 1->2->3', () => {
7676 let xml3 = parser . parseFromString ( way3 , 'text/xml' ) . getElementsByTagName ( 'way' ) [ 0 ] ;
7777 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 ] ) ;
7878 expect ( result . length ) . toBe ( 1 ) ;
79- expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
79+ expect ( BuildingShapeUtils . isClosed ( result [ 0 ] ) ) ;
8080 // expect 4 nodes
8181 // expect result to contain nodes 1, 2 and 3.
8282} ) ;
@@ -93,7 +93,7 @@ test('Test combining 4 ways', () => {
9393 let xml4 = parser . parseFromString ( way4 , 'text/xml' ) . getElementsByTagName ( 'way' ) [ 0 ] ;
9494 let result = BuildingShapeUtils . combineWays ( [ xml1 , xml2 , xml3 , xml4 ] ) ;
9595 expect ( result . length ) . toBe ( 1 ) ;
96- expect ( BuildingShapeUtils . isClosed ( result [ 1 ] ) ) ;
96+ expect ( BuildingShapeUtils . isClosed ( result [ 0 ] ) ) ;
9797 // expect 5 nodes
9898 // expect result to contain nodes 1, 2 3, and 4.
9999} ) ;
0 commit comments