adobe/brackets — pull request #4448 by bchintx (2013-07-13 04:58:55+00:00)
Title: fix "Integration / DocumentCommandHandler" unit tests

Pull Request #4437 broke the "Integration / Document CommandHandler" unit tests, which caused instability in the Jenkins builds.

The cause was that the unit tests were not allowing the (updated) file-save-as operations time to complete their asynchronous operation. Consequently, when the unit tests then attempted to confirm the new "current document", the newly saved document hadn't yet been marked as such by the asynchronous handler.

The fix was to just add small delay to the unit tests, which allow the asynchronous operation to complete and set the new "current document".

I've confirmed that all "Unit", "Integration", and "Extensions" Spec Runner tests now complete successfully on both Windows and Mac.