documentcloud/backbone — comment on commit 1332246b8f3b6672d3c3f19dd21c99765f4f8282
File:  line 0
By timcharper:

It seems like it does matter: the tests are executed serially, not in parallel. Therefore, the next test must wait for the prior one to finish before it can proceed.

Otherwise, in order to achieve parallel asynchronous tests, each test would need to execute in it's own iFrame.

Most setTimeouts are extremely short because for most operations the Javascript engine needs to return from it's execution path and turn control back over to the browser event loop. A mere 1ms will achieve that.

It's not a big deal to concern about, but it is a small deal because of the unspecified requirement that the browser react within 500ms. In my tests, some were slower than others.

In other news, I noticed this call to _updateLocationHash was missed by your refactorings:

https://github.com/documentcloud/backbone/blob/1332246b8f3b6672d3c3f19dd21c99765f4f8282/backbone.js#L882

As is, it will manifest an error in dated browsers that require the iFrame hack, such as IE7. I'll send a pull request to fix it.