DEV Community

Discussion on: My Node.js Setup (Mocha & Chai, Babel7, ES6)

Collapse
 
popham profile image
Tim Popham

Thanks for the schematic. It helped me work around some difficulty that I was having with configuring Mocha to work with Flow.

I noticed some bad advice, however, under your test script. NPM adds the .node_modules/.bin directory to the path when you run any npm script, so the ./node_modules/.bin/mocha is unnecessary--mocha alone is sufficient. Further, relying on your global installs in your scripts is non-portable. You shouldn't impose on your users to reproduce your global environment on their machines.