How to unit test NodeJS HTTP requests?

Tags:

I have a nodejs app where I wanted to unit test some HTTP requests. Node usually makes things simple, so I expected this to be like that too… but I soon discovered that this was not the case at all. When unit testing, you don’t want HTTP requests to go out and affect the result. Instead you create a fake …

Strange JavaScript errors and how to fix them

Tags:

JavaScript has some of the strangest errors. Undefined is not a function? Ugh. I wrote an article talking about JS errors and a guide on how to fix them on David Walsh’s blog, you should go check it out! JavaScript errors and how to fix them

ES6: What are the benefits of the new features in practice?

Tags:

You’ve probably seen people talk about the features in JavaScript’s 6th edition, ES6, or ECMAScript 6. Promises, let keyword, iterators, etc. But why should you care? I certainly heard a lot about it, but I hadn’t looked into it because I wasn’t interested in theory, but rather the benefits I would get in my day to day work. Is it …