scottaj / mocha.el

Emacs mode for running mocha tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to toggle passing file name for spec at point

scottaj opened this issue · comments

Right now when we run the spec at point, we also pass the file name. This can be good in that it is more restrictive in what gets run. However, it can also prevent global init code in other files from getting run.

As a workaround, you can set

(setq mocha-command "yarn test")

or

(setq mocha-command "npm test -- ")

and then add test script to the scripts in package.json and test all the files there. Then when you do mocha-test-at-point it gets all the filenames anyway.