[[https://melpa.org/#/jest][file:https://melpa.org/packages/jest-badge.svg]]
Credit: [[https://github.com/wbolster/emacs-python-pytest][emacs-python-pytest]]
This package provides helpers to run jest.
With ~use-package~:
(use-package jest)
Manually:
M-x package-install RET jest RET
A prefix argument causes the generated command line to be offered for editing, and various customization options influence how some of the commands work. See the README.org for detailed information.
(use-package jest :after (js2-mode) :hook (js2-mode . jest-minor-mode))
Switches -b bail (--bail) -c colors (--colors) -C coverage (--coverage) -d run doctests (--doctest-modules) -D debug jest config (--debug) -e expand (--expand) -f force exit (--forceExit) -l last commit (--lastCommit) -o only changed (--onlyChanged) -s silent (--silent) -v verbose (--verbose) -w watch (--watch) -W watch all (--watchAll)
Options =c config file (--config=) =k only names matching expression (-t) =p only files matching expression (--testPathPattern ) =P only files not matching expression (--testPathIgnorePatterns ) =o output file (--outputFile=) =x exit after N failures or errors (--maxfail=)
Run tests t Test all x Test last-failed
Run tests for current context f Test file F Test this file d Test function
Repeat tests r Repeat last test run