I am using JsTestDriver for unit tests in JS. One section of my code uses a confirm box to allow users to confirm or cancel a decision.
How to I test both the confirm and cancel selections of this confirm box automatically within the scope of JsTestDriver
Ok, the way I handled this was to use Jack.js mocking library to mock the confirm function returning both True and False in turn.