4 ms·
Here is a little bit of background. I'm writing RESTful service using node and I really like how easy is to write async code. There are tools in node that allow
by daliusd 15y ago
Here is a little bit of background. I'm writing RESTful service using node and I really like how easy is to write async code. There are tools in node that allows me testing it - one example here https://github.com/flatiron/api-easy https://github.com/flatiron/api-easy but there are more that I have considered. The problem I have with all those options: I need to write too much code to produce simple test. Python unittest and python-requests modules allow me writing much simpler code that actually does the same. There is simply no sense writing async code for unit-test like testing. Node is good for writing async code and I'm really happy this that.
Client side async code has its own place as well. I really enjoyed writing complex load tests with node. That was simpler than investigating python options and node is faster in such scenario.
- tjholowaychuk 15y agoIt's always going to be a little annoying with node's callbacks, but they dont have to be large. In connect all I do for an http test is (with mocha) https://gist.github.com/a5f796fff5fc72748e1b https://gist.github.com/a5f796fff5fc72748e1b A lot of it definitely comes down to API, but when it comes to callbacks I would agree