We have more than 5,000 unit tests for jQuery, and we run the jQuery UI unit tests before a release as well, plus we plead with the entire community to please please pretty-please-with-sugar-on-top test the pre-release versions before we go final--for example, you tested with the pre-release versions, right?
And then we ship. When someone finds a bug that wasn't covered by one of the existing tests, the best we can do is to fix it and add some more unit tests to ensure it doesn't happen again.
If we had a time machine, we could do much better of course. I would send rwaldron back to 2011 to insert the new unit tests into the 1.6 branch so that we would not introduce those bugs in 1.7. But then he would get cocky and decide to kill Bin Laden himself and really mess up the timeline because it turns out he kills Bin Laden on Friday and Rebecca Black's song becomes the patriotic anthem for the whole country and we have to listen to it before every major sporting event.
So all things considered, this bug isn't so bad.