Backbone.history.start() can be only be called once, doing otherwise will
cause an Error to be thrown with the message “Backbone.history has already been started”.
This can be annoying when testing because it’s common practice to have an App namespace that contains a initializer method to setup your application, including starting Backbone’s history.
1 2 3 4 5 6 | |
But each test case you write that calls this initializer method will also call
Backbone.history.start(). The solution is use Backbone.history.stop() which
will disable history temporarily.
1 2 3 4 5 6 7 8 9 10 11 | |
Source