angular/angular.js — pull request #4163 by jeffbcross (2013-09-25 23:58:38+00:00)
Title: fix(mock): Added a way to preserve initally-bound events

Some third-party libraries, such as bootstrap, rely on
events that were initially added to the document in order
to function properly. Since angularMock automatically
clears data and events after each test, testing angular
components built with these third-party libraries becomes
impossible.

The solution is to preserve events that were added before
the first test, and let the angularMocks continue to do
its automatic cleanup for everything that is added thereafter.

Fixes #3916