Skip to content
Published on

Jest Plugin for Neovim

Moving from coc.nvim to Neovim's built-in LSP setup improved my day-to-day editing, but it broke one important workflow: running Jest quickly from inside the editor. coc-jest depends on coc.nvim, so the migration removed that path.

I built jest.nvim to restore that workflow.

The plugin runs Jest for:

  • the whole project
  • the current file
  • the nearest test under the cursor

Results open in a split, which keeps the edit-run-debug loop inside the same session.

Implementation-wise, this plugin mostly wires commands: map user commands to Lua functions, resolve target scope (project/file/test), and invoke Jest in a terminal split.

Selecting the nearest test name reliably took the most effort. Lua patterns differ from regexes, so I tuned the matcher to avoid picking the wrong block.

If you want the code: https://github.com/mattkubej/jest.nvim

Copyright © 2026 Matt Kubej