Get help with testing, discuss unit testing strategies etc.
var toolbar = app.down('toolbar');
if(!toolbar){
t.fail('Could not find toolbar')
t.done();
return;
}
Is this the correct way of aborting if a component isn't there?
Yes, everything is correct.
Or more shorthand:
var toolbar = app.down('toolbar');
t.ok(toolbark, 'Toolbar found');
But i would not get a meaningful message in the log if it failed right? .. Just a script line
It would say that it failed in the assertion list and the message would be "'Toolbar found'". What would ye like?
Oh...ok.. Thats good. Must have missed that feature