Closed platinumazure closed 6 years ago
When running an npm/yarn script, ./node_modules/.bin
is temporarily
inserted into your PATH at the beginning. So as long as mocha is installed
locally, yarn test
actually calls the local mocha, not a global one.
Since you have mocha as a devDependency, everything should work just fine.
:smile:
On Fri, Apr 6, 2018, 15:12 Douglas Duhaime notifications@github.com wrote:
@duhaime commented on this pull request.
@platinumazure https://github.com/platinumazure Thanks so much for this! My only question is why not call the mocha binary right from the node_modules? I prefer to avoid globally installing modules, so would rather revert to ./node_modules/mocha/bin/mocha ./tests/*.js in package.json. This reversion would also help others who prefer to avoid dependency installation at the system level. What do you think about that?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duhaime/eslint-plugin-frontmatter/pull/3#pullrequestreview-110194430, or mute the thread https://github.com/notifications/unsubscribe-auth/AARWegvzlf57ANNeesDaWYXhx5JlNqDjks5tl8wcgaJpZM4TKY_W .
See https://yarnpkg.com/lang/en/docs/cli/run/ for more details.
Ah, thanks @platinumazure I didn't know that! Thanks again for this PR!
Added some new failing tests and fixed the code to ensure the tests pass. I also created a fixture directory to make it easier to add new cases.