visionmedia/supertest — pull request #106 by swang (2014-03-04 01:13:55+00:00)
Title: Allow numbers to be used for asserting headers

Hi. First off thanks for making this module. Makes testing web app routes easy to test.

This change allows a number to be used as the second parameter (value) when asserting headers using expect()

e.g. expect('Content-Length', 20)

I ran into this problem when I was passing string.length for the content length and was getting a confusing error message (`[Error: expected 'Content-Length' response body, got 'Z9ASMVNVDM']`) because I couldn't understand why supertest was expecting 'Content-Length' in the body.