edmundmiller / emacs-jest

A package to run jest inside emacs
GNU General Public License v3.0
81 stars 18 forks source link

Documentation of use #11

Closed camachojua closed 1 year ago

camachojua commented 4 years ago

I've been trying to use your package without good results, for the installation I'm using use-package in this way:

;; Jest mode
(use-package jest
  :ensure t
  :config
  (setq jest-executable "npm run test --"))

(use-package add-node-modules-path
  :ensure t)

When I'm editing a test file and after executing M-x jest-popup t I get the following message in the minibuffer:

Wrong type argument: stringp, nil

My package.json looks like this:

"scripts": {
    "test": "jest"
  }

Could anyone provide me help on this configuration issue?

edmundmiller commented 4 years ago

@camachojua Sorry I hadn't gotten back to this! I've started using https://github.com/avajs/ava over jest, personally. I have some thoughts to generalize this to run with any test suite but it's pretty low on my todolist.

The first pass was rough and relys on jest being globally installed(From the issues I've read) I think a better general solution would be to use the npm testscripts and test: for partial runs.