You can overwrite the default timeout to 0 with:
UIATarget.localTarget().pushTimeout(timeoutInSeconds);
However it does not seem to be a good idea to check validation in a while cycle with 0 timeout.
function reset (app) {
// While we have a left button on the nav bar, tap it.
// This effectively resets our app
UIATarget.localTarget().pushTimeout(0);
if (app.mainWindow().navigationBars()[0].leftButton().isValid()) {
app.mainWindow().navigationBars()[0].leftButton().tap();
}
UIATarget.localTarget().popTimeout();
}