edmundmiller / emacs-jest

A package to run jest inside emacs
GNU General Public License v3.0
81 stars 18 forks source link
emacs emacs-lisp emacs-modules emacs-packages hacktoberfest javascript jest package testing unit-testing

+TITLE: jest.el

[[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~:

+BEGIN_SRC elisp

(use-package jest)

+END_SRC

Manually:

+BEGIN_SRC

M-x package-install RET jest RET

+END_SRC

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.

+begin_src el

(use-package jest :after (js2-mode) :hook (js2-mode . jest-minor-mode))

+end_src

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

+END_SRC