Getting Node-Inspector to work with Lab/HapiJS

2015-07-17 14:37:41 -0400

Debugging specs with console.log statements is a real pain. Node-Inspector is far better, giving you an environment that is basically the same as Chrome DevTools.

To use it with Lab, add this script to your package.json file:

  // other package.json stuff
  "scripts": {
    "test-debug": "node-debug ./node_modules/.bin/lab"

You can now run all of your specs with npm run test-debug , or run the specs in just one file with npm run test-debug <path to your spec file>.js.