Skip to content

Commit 5a65fce

Browse files
authored
[facemesh] Ensure bounding box is returned correctly (#467)
1 parent 1f95d3d commit 5a65fce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

facemesh/src/facemesh_test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,18 @@ describeWithFlags('Facemesh', ALL_ENVS, () => {
7878
expect(face.boundingBox).toBeDefined();
7979
expect(face.mesh).toBeDefined();
8080
expect(face.scaledMesh).toBeDefined();
81+
82+
const topLeft = face.boundingBox.topLeft as [number, number];
83+
const bottomRight = face.boundingBox.bottomRight as [number, number];
84+
85+
expect(topLeft[0]).toBeDefined();
86+
expect(topLeft[0]).not.toBeNaN();
87+
expect(topLeft[1]).toBeDefined();
88+
expect(topLeft[1]).not.toBeNaN();
89+
90+
expect(bottomRight[0]).toBeDefined();
91+
expect(bottomRight[0]).not.toBeNaN();
92+
expect(bottomRight[1]).toBeDefined();
93+
expect(bottomRight[1]).not.toBeNaN();
8194
});
8295
});

0 commit comments

Comments
 (0)