emacs-jest icon indicating copy to clipboard operation
emacs-jest copied to clipboard

Better default value for jest-executable

Open davazp opened this issue 3 years ago • 0 comments

I have been setting up jest.el for my projects and noticed that the default value of jest-executable (npm test) is not that general.

In my case, the default breaks because we work in a monorepository where the toplevel test is not directly invoking jest.

Proposed solution

I would propose to change it to npx --no-install jest, which should work in a larger number of cases.

The downside is you need a bit more modern version of npm. But it was introduced a while back.

Alternative solution

Alternatively, finding "jest" in the path would also work and the user could rely on add-node-modules-path. Related discussion: #2. But my proposed default value should work in most installations.

davazp avatar Mar 06 '21 10:03 davazp