So I wrote some experimental and almost pointlessly generic connect like #nodejs thing… https://github.com/sandfox/node-pinion …
-
-
Replying to @sandfoxthat
@sandfoxuk I don't think it's pointless. I was coding a middleware a week ago; testing is hard.
2 replies 0 retweets 0 likes -
Replying to @nouswaves
@sandfoxuk I had to use supertest to create the request+response objects, but then doing so meant I couldn't test throwing exceptions...
2 replies 0 retweets 0 likes -
Replying to @nouswaves
@sandfoxuk All very well if you want to test the response, but I wanted to test some side-effects of running my middleware.
1 reply 0 retweets 0 likes
@sandfoxuk Ended up using a spy, but I think it's a failure of connect which doesn't allow its default behaviour to be overridden.
4:21 PM - 2 Jan 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.