a simple non-blocking-yet-synchronous wait(seconds)
module
npm install sync-rest-client
const waitSync = require('wait-sync');
console.log(1);
// setTimeout is async - but that's ok - since
// waitSync is non-blocking
setTimeout(() => console.log(2), 1000);
waitSync(1.5); // wait 1.5 seconds - !synchronously!
console.log(3);
// outputs 1, 2, and then 3 (as expected)
npm run test