Skip to content

Commit edb1bf6

Browse files
authored
Update utils.test.js
1 parent 54e7346 commit edb1bf6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/utils.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,14 @@ test('Get Width', () => {
100100
test('Vertex Angles', () => {
101101
expect(BuildingShapeUtils.vertexAngle(rightTriangle)).toStrictEqual([Math.PI / 2, Math.PI / 4, Math.PI / 4]);
102102
});
103+
104+
const rightTriangle2 = new Shape();
105+
rightTriangle.moveTo(1, 1);
106+
rightTriangle.lineTo(-1, 1);
107+
rightTriangle.lineTo(1, -1);
108+
test('Vertex Angles counterclockwise', () => {
109+
expect(BuildingShapeUtils.vertexAngle(rightTriangle2)).toStrictEqual([-Math.PI / 2, -Math.PI / 4, -Math.PI / 4]);
110+
});
111+
// test surrounds
112+
113+
// test calcRadius

0 commit comments

Comments
 (0)