Skip to content

Commit d40554a

Browse files
authored
Combining (#81)
* Update combine_ways.je
1 parent 4a6e252 commit d40554a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/combine_ways.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ import { Shape } from 'three';
1313
import { BuildingShapeUtils } from '../src/extras/BuildingShapeUtils.js';
1414
// import { JSDOM } from 'jsdom';
1515

16+
test('Test no combining necessary. one open way', () => {
17+
var way1 = '<way id="1"><nd ref="1"/><nd ref="2"/><nd ref="3"/><nd ref="4"/></way>';
18+
let parser = new window.DOMParser();
19+
let xml1 = parser.parseFromString(way1, 'text/xml').getElementsByTagName('way')[0];
20+
let result = BuildingShapeUtils.combineWays([xml1]);
21+
expect(result.length).toBe(0);
22+
});
23+
1624
test('Test combining 2 ways 1->2', () => {
1725
var way1 = '<way id="1"><nd ref="1"/><nd ref="2"/><nd ref="3"/></way>';
1826
var way2 = '<way id="2"><nd ref="3"/><nd ref="4"/><nd ref="1"/></way>';

0 commit comments

Comments
 (0)