Effective Mocha Testing

Mocha Testing Tips & Tricks for JS Developers

Tips and Tricks on mocha testing. I’ve seen a couple of applications using Mocha where import and require is used in every single testfile. This is especially intensive when doing testing in React where you include multiple packages to perform your testing. Thus I’m writing this post with some small tips & tricks on how […]

See More
Generators and iterators can be very useful if you get a hang of it

Generators and iterators in Javascript for Promise Flow Control

A guide on how to use generators to create your own utility class to handle application flow with Promises in parallel. The package is available on npmjs.com and GitHub. 1npm install node-promise-parallel –save GitHub: https://github.com/snappyjs/node-promise-parallel npmjs: https://www.npmjs.com/package/node-promise-parallel Introduction I heard about function* (generators) and iterators quite some time ago now but I didn’t really understand the need […]

See More
Requests in a queue using NodeJS

NodeJS: HTTP Requests queued for web scraping

tl;dr A post on how I created a utility to queue up requests, with possibility to run a set amount of requests in parallel with a delay between them. All the code is available in github or npm if you just want to start using it. 1npm install node-request-queue –save GitHub: https://www.github.com/snappyjs/node-request-queue npmjs: https://www.npmjs.com/node-request-queue Introduction […]

See More