The devDependencies section of npm's package.json documentation says to list your test dependencies there so that users of your package don't have to pull down extra dependencies. Would it make sense to also add my test directory to
.npmignore in that case?
Yes that's what most people do, here are some npmignore files for popular Node.js modules:
Other people whitelist what they want published in their
There is currently no discussion for this recipe.
This recipe can be found in it's original form on Stack Over Flow.