Skip to content

Commit 1eb9614

Browse files
authored
Update gabledroofbug.test.js
1 parent be455c9 commit 1eb9614

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/gabledroofbug.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ test ('Factory', () => {
5252
expect(global.fetch.mock.calls[0][0]).toBe('/api/data');
5353
});
5454

55+
// compare the object rendered from the requested way data to that rendered
56+
// from the requested map data to see if one errors and one does not.
57+
test('Constructor', () => {
58+
const bldg = new Building('31361386', data);
59+
expect(bldg.parts.length).toBe(1);
60+
const part = bldg.parts[0];
61+
const meshes = part.render();
62+
const roofmesh = meshes[0];
63+
const roofGeometry = roofmesh.geometry;
64+
expect(roofGeometry.constructor.name).toBe('WedgeGeometry');
65+
});
66+
5567
window.printError = printError;
5668

5769
var errors = [];

0 commit comments

Comments
 (0)