Skip to content

Commit 3af2aec

Browse files
authored
Update utils.test.js
1 parent 6177f2a commit 3af2aec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/utils.test.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ rightTriangle2.lineTo(1, -1);
108108
test('Vertex Angles counterclockwise', () => {
109109
expect(BuildingShapeUtils.vertexAngle(rightTriangle2)).toStrictEqual([-Math.PI / 2, -Math.PI / 4, -Math.PI / 4]);
110110
});
111-
// test surrounds
111+
112+
describe('Surrounds', () => {
113+
test.each([
114+
[[-1, -1], false, "Outside",],
115+
[[1, 1], true, "Inside",],
116+
])('${description}',(point, expected, description) => {
117+
expect(BuildingShapeUtils.surrounds(rightTriange, point).toBe(expected);
118+
});
119+
});
112120

113121
// test calcRadius

0 commit comments

Comments
 (0)