MCPcopy
hub / github.com/aframevr/aframe / verifyControllerSetup

Function verifyControllerSetup

tests/components/meta-touch-controls.test.js:49–54  ·  view source on GitHub ↗

* Verifies that the method spy's are in the right state for a controller * that has been injected. * * @param {object} component - The oculus-go-controls component to verify fields.

(component)

Source from the content-addressed store, hash-verified

47 * @param {object} component - The oculus-go-controls component to verify fields.
48 */
49 function verifyControllerSetup (component) {
50 sinon.assert.calledOnce(injectTrackedControlsSpy);
51 sinon.assert.calledOnce(addEventListenersSpy);
52 sinon.assert.notCalled(removeEventListenersSpy);
53 assert.strictEqual(component.controllerPresent, true);
54 }
55
56 test('returns not present if no controllers on first call', function () {
57 // Our current setup state is that no controllers are present. Check for presence

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected