oesmith/puffing-billy — pull request #7 by Swizec (2013-03-14 12:18:05+00:00)
Title: VCR-like cache

Hey,

I prefer VCR to manually mocking every API under the sun and I wanted to use it when testing javascript that makes API requests.

Since that's impossible I improved puffing-billy to do that.

Things added:
- ability to persist cache
- ability to ignore parameters on some requests
- caching different types of requests
- added all of the above to README

In essence this means you can take frontend tests completely offline without mocking out every analytics and social button thing on your website and with full support for repeatable tests when Javascript talks to 3rd parties (stripe, balanced, and so on).

The ignoring parameters part is important because it makes things like google analytics and social buttons cacheable since they don't really affect tests, but do make a 3rd party request and always with a different URL.

I've also added tests for all of this to the best of my abilities.

Cheers,
~Swizec