jfirebaugh/konacha — pull request #155 by zoeesilcock (2013-11-18 19:04:36+00:00)
Title: add an optional manifest file for general assets

I ran across a [blog post](http://icu.iorahealth.com/blog/2013/05/31/speeding-up-the-konacha-javascript-testing-framework-with-views) about speeding up konacha. After playing around with it and seeing a big improvement in the speed of my tests I decided to check how come this hasn't been added. As far as I can see they never got around to making a pull request or perhaps you have already rejected it. In either case I decided to implement it in the way they suggested as I like the feature.

The basic idea is to cut down on asset requests by allowing the user to specify assets that don't need to be reloaded for each spec. This is done by adding a new manifest file (konacha/manifest.js) which is included in the iframe. Any files in there will only get requested once for each test instead of once for each spec.

Depending on the amount of assets in the spec_helper and the average amount of specs per test this can make a huge difference to the amount of time it takes to run the tests. Obviously this has the same pitfalls as adding assets to the spec_helper as well as some new ones, but if used properly I think it is a useful feature.

All credit goes to [Myke Cameron](https://github.com/mykecameron) as he proposed this solution.