From 16747e861aa7d59875a11b3fe880144c7dd8baf9 Mon Sep 17 00:00:00 2001 From: Diego Marcos Segura Date: Tue, 5 Dec 2023 13:35:29 -0800 Subject: [PATCH] Fix tests --- tests/components/hand-tracking-controls.test.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/components/hand-tracking-controls.test.js b/tests/components/hand-tracking-controls.test.js index 19e5ad92230..45a3da90b0f 100644 --- a/tests/components/hand-tracking-controls.test.js +++ b/tests/components/hand-tracking-controls.test.js @@ -69,15 +69,13 @@ suite('tracked-controls-webxr', function () { test('attached to the wrist joint', function (done) { var boxEl = document.createElement('a-box'); el.addEventListener('child-attached', function () { + assert.ok(el.components['hand-tracking-controls'].wristObject3D); assert.equal(boxEl.object3D.parent, el.components['hand-tracking-controls'].wristObject3D); done(); }); - el.addEventListener('model-loaded', function () { - assert.ok(el.components['hand-tracking-controls'].wristObject3D); - el.appendChild(boxEl); - }); el.setAttribute('hand-tracking-controls', {hand: 'left'}); el.components['hand-tracking-controls'].checkIfControllerPresent(); + el.appendChild(boxEl); }); });