Add a JS disconnect test and mock hardware disconnect command.

Add some coverage around the disconnect callback.