your friend… Break hard dependencies. function ShoppingController(){ this.on("theyWannaCheckoutEvent", function(){ window.PaymentGateway.chargeCustomer(50.50); }) } describe(“A test that really charges the customer”, function(){ it(“Drains David’s Bank Account”, function(){ new ShoppingController().trigger(“theyWann aCheckoutEvent”); //Uhhhh expect me to check my balance //in the Charles Schwab app... } }