We could simplify most of this down to just a waitsForDone(), and move the remaining `expect(result).toBe(flag);` bit into the done() handler above.