Skip to content

Commit

Permalink
test(MeshRenderer): update unit test case of MeshRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
jtabibito committed Aug 4, 2023
1 parent eaa8575 commit 1e4d1b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/src/core/MeshRenderer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ describe("MeshRenderer", async function () {
mr.mesh = cubeMesh;
expect(mr.mesh).to.equal(cubeMesh);
expect(cubeMesh2.refCount).to.be.equal(0);

mr.mesh = null;
});

it("enableVertexColor", () => {
Expand All @@ -58,6 +60,10 @@ describe("MeshRenderer", async function () {

it("bounds", () => {
const mr = cubeEntity.getComponent(MeshRenderer);
expect(mr.bounds.min).to.deep.include({ x: 0, y: 0, z: 0 });
expect(mr.bounds.max).to.deep.include({ x: 0, y: 0, z: 0 });

mr.mesh = cubeMesh;
expect(mr.bounds.min).to.deep.include({ x: -1, y: -1, z: -1 });
expect(mr.bounds.max).to.deep.include({ x: 1, y: 1, z: 1 });

Expand Down

0 comments on commit 1e4d1b4

Please sign in to comment.