I am working in JavaScript and I want to test for an error scenario where a function receives an undefined argument and throws and error. My test is passing but the presence of this error is causing a Jenkins deployment to fail. Is there a way to have a test expect an error to be throw and not have this disrupt a Jenkins build?