gamepad.disconnect
gamepad.disconnect(): Promise<void>
Section titled “gamepad.disconnect(): Promise<void>”Disconnects the current gamepad instance.
This method removes the gamepad from the running UI environment. Useful when you need to simulate physically unplugging a controller.
- Returns a promise that resolves once the gamepad is successfully disconnected.
describe('Gamepad tests', function () { it('Disconnects a gamepad', async () => { const gamepad = await gf.connectGamepad();
// Perform some interactions...
await gamepad.disconnect(); });});