Block execution synchronously
Obviously this is counter to everything we know about not blocking the event loop I wrote this simple wrapper for testing purposes. Sometimes it's useful to simulate the blocking of the event loop, so we can work on how to handle that scenario from outside of Node.
$ npm install --save sleep-sync
const sleep = require('sleep-sync') doStuffAsync() sleep(333) // block ALL execution for 333 milliseconds doMoreStuff()