Here's how we were able to reduce our functional testing and greatly speed up our build times by generating fully rendered [Velocity] (http://velocity.apache.org/) templates on demand and testing their interaction with our JavaScript.
The conventional wisdom is that unit testing views is hard, then therefore best left to functional tests, but these tests tend to be slow and not really designed for testing error scenarios/multiple cases/etc. In our case unit testing the JavaScript without the views would be largly pointless as most of the logic is directly linked to elements on the page. We could have just had some fixture data that emulated our views, but then you get into a maintenance nightmare trying to keep them both in sync. The ideal solution would be to test against the real views.