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

`trigger: true` is undesirable because it's strictly speaking an inferior API to simply calling the appropriate function yourself. You lose information by serializing it into a URL string and then immediately deserializing it.

searchQueryObject -> .navigate(serializedVersionOfSearch) -> route(serializedVersionOfSearch) -> searchQueryObject

... much, much nicer just to pass your object to the appropriate function, and save the history change as a side effect along the way.

As the test is asynchronous, it doen't matter much to wait the appropriate amount of time. `waitFor` is a fine function -- it was just only being used in this one place. If you'd like to submit a patch that replaces all uses of `setTimeout` with `waitFor` across the test suite, we can certainly take that change.