mikeal/request — pull request #1143 by nylen (2014-10-11 19:00:02+00:00)
Title: Rewrite all tests to use tape

This is a massive PR, but I hope it can be reviewed and merged quickly because:

- We badly need to move away from the ad-hoc testing structure we have now. In the process of rewriting the tests I found a lot of instances where tests were not being called or were not working as expected.
- This will go stale pretty quickly if it's not merged.
- It was a hell of a lot of work on my end.

For pretty reporting, I'm using [`taper`](https://github.com/nylen/taper), an old project I found, forked, and fixed up. It's not perfect, but none of the existing reporters met my wishlist:

- Clean, concise, preferably colored output, with clear indications of where errors occur
- Test file timeout support - this is crucial for tape because it's easy to forget to end a test properly, and when this happens they just hang.

You can see what the output looks like:

- [when all tests pass](https://travis-ci.org/nylen/request/jobs/37699501)
- [when some of them fail](https://travis-ci.org/nylen/request/jobs/37697054).

This should also help with the intermittent build failures we've been seeing on Travis. For example, [this job output](https://travis-ci.org/nylen/request/jobs/37698924) gives more clues as to the problem with `test-timeout.js`.

I also cleaned up any linting issues that stood out to me, so we should be well-positioned to start linting the test directory as a next step.

I'll be around to help address any follow-up issues.