jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

config path to istanbul #442

Closed nwtn closed 8 years ago

nwtn commented 8 years ago

Would it be possible to add a coverage config option for the path to istanbul? Or have teaspoon check ./node_modules/.bin/istanbul for the executable?

I’d love to be able to put istanbul in my package.json and not have to rely on installing it globally, but doing this results in the You requested coverage reports, but Teaspoon cannot find the istanbul binary. Run: npm install -g istanbul error (unless I manually update my path).

jejacks0n commented 8 years ago

https://github.com/modeset/teaspoon/blob/master/lib/teaspoon/utility.rb

It simply looks for external commands that are accessible in your path, so you can add your custom instanbul path if you don't want it global.

What you're asking for was added at one point and removed. It makes it far more confusing, and made istanbul the outlier with checking in multiple places. Because it can exist in multiple places the problem becomes "which one is it using?". So being a dependency, we treat it as a dependency, and expect the system to dictate where it is and which one to use via the path.