I figured the best way to do this is throw an error in the function I'm testing when certain conditions are met