adobe/brackets — pull request #5139 by redmunds (2013-09-09 23:11:01+00:00)
Title: Verify folder exists before operating on it

This is for #5109.

@RaymondLim is correct that `SpecRunnerUtils.removeTempDirectory()` is causing the problem. It is not causing other unit tests to fail, but is failing itself. Since it uses `WaitsForDone()` outside of any `it()` function, Jasmine does not know where to write errors, so they go to last test that was run.

`removeTempDirectory()` needs to be synchronous because it is now run at the *beginning* of unit tests. When run at the *end* of unit tests, it might be more desirable to have an async version that reports errors to console.

Another issue I discovered is that `removeTempDirectory()` is only executed when running an all sets of tests in a suite. It would be nice if this could also be run when only running a single set of tests or only a single test.

cc @JeffryBooher