change PhantomJS to Firefox browser to that window.navigator.vibrate will pass