@jasonsanjose  Yeah, I know.  Weird, right?

So, without this wait() call, the call to getCurrentDocument() on the next line will return the document *before* the save-as occurred (ie. the old filename).  As a result, the check to make sure that the save-as was successful fails.

So far as I can tell, it's not the promise of the _doSaveAs that's failing.  It's the .done() handler for the doOpen() call that fails to get called.  In other words, the file-save-as attempts to open the freshly saved file after saving it under the new filename.  However, the setCurrentDocument() (in the .done() handler in doOpen() at line 188 of DocumentCommandHandlers.js) doesn't get called in time to set the "current document" before the unit tests check for the (new) current document.