(no title)
BonsaiDen | 10 years ago
For our use case we have some pretty "fancy" deep-equals logic for nested structures and allow to specific fields as "to be ignored" in our test expectations.
When it comes to speed, the most important part is to cut out everything you don't need, for us this means that our testing framework completely throws away the internals of Node.js HTTP layer. We never create a single TCP socket in our tests, which gives an incredible speed up. As a bonus this also allows to test timeouts and low level HTTP errors in < 1ms, since we can just return the timeout directly from the low level APIs and Node.js will invoke the timeout event on the http client handle.
> Running "noir:mock" (noir) task > ...................................................... > 1048 passing (10s)
And yes, that really reads 10 seconds and yes I always get a bit bored when I have to run the tests for one of our Django backends, feels like an eternity... :)
maccard|10 years ago
MaulingMonkey|10 years ago
...sadly that's still only for a single project x config x arch combination. I still need to play around with incremental linking options that appear off by default...
hinkley|10 years ago