{"id":13412599,"url":"https://github.com/David-Kunz/jester","last_synced_at":"2025-03-14T18:31:48.415Z","repository":{"id":37582064,"uuid":"384989484","full_name":"David-Kunz/jester","owner":"David-Kunz","description":"A Neovim plugin to easily run and debug Jest tests","archived":false,"fork":false,"pushed_at":"2023-06-01T06:54:39.000Z","size":45,"stargazers_count":194,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-31T20:51:09.202Z","etag":null,"topics":["jest","lua","neovim","nvim-dap","plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/David-Kunz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-07-11T15:51:35.000Z","updated_at":"2024-07-21T04:53:00.000Z","dependencies_parsed_at":"2024-01-03T03:30:14.527Z","dependency_job_id":"cbda72b1-8dad-44a4-b95d-40b73747c99d","html_url":"https://github.com/David-Kunz/jester","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Kunz%2Fjester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Kunz%2Fjester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Kunz%2Fjester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Kunz%2Fjester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/David-Kunz","download_url":"https://codeload.github.com/David-Kunz/jester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243625152,"owners_count":20321241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","lua","neovim","nvim-dap","plugin"],"created_at":"2024-07-30T20:01:26.631Z","updated_at":"2025-03-14T18:31:48.099Z","avatar_url":"https://github.com/David-Kunz.png","language":"Lua","funding_links":[],"categories":["Test","Lua","Packages"],"sub_categories":["Quickfix","IDE"],"readme":"# jester\n\nA [Neovim](https://neovim.io/) plugin to easily run and debug [Jest](https://jestjs.io/) tests.\n\n![jester](https://user-images.githubusercontent.com/1009936/125203183-ba543b00-e277-11eb-83a2-d7fe912cdec8.gif)\n\n## Installation\n\nRequirements: [Neovim](https://neovim.io/), [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter), for debugging [nvim-dap](https://github.com/mfussenegger/nvim-dap).\n\nMake sure that the JavaScript/TypeScript parser for [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) is installed and enabled.\n\nFor [vim-plug](https://github.com/junegunn/vim-plug):\n```\nPlug 'David-Kunz/jester'\n```\nFor [packer](https://github.com/wbthomason/packer.nvim):\n```\nuse 'David-Kunz/jester'\n```\n\n## Usage\n\n### Run nearest test(s) under the cursor\n\n```\n:lua require\"jester\".run()\n```\n\n### Run current file\n\n```\n:lua require\"jester\".run_file()\n```\n\n### Run last test(s)\n\n```\n:lua require\"jester\".run_last()\n```\n\n### Debug nearest test(s) under the cursor\n\n```\n:lua require\"jester\".debug()\n```\n\n### Debug current file\n\n```\n:lua require\"jester\".debug_file()\n```\n\n### Debug last test(s)\n\n```\n:lua require\"jester\".debug_last()\n```\n\n## Options\n\nYou can specify global options using the `setup` function.\n\nExample:\n\n```lua\nrequire(\"jester\").setup({\n  dap = {\n    console = \"externalTerminal\"\n  }\n})\n```\n\nThese are the defaults:\n\n```lua\n{\n  cmd = \"jest -t '$result' -- $file\", -- run command\n  identifiers = {\"test\", \"it\"}, -- used to identify tests\n  prepend = {\"describe\"}, -- prepend describe blocks\n  expressions = {\"call_expression\"}, -- tree-sitter object used to scan for tests/describe blocks\n  path_to_jest_run = 'jest', -- used to run tests\n  path_to_jest_debug = './node_modules/.bin/jest', -- used for debugging\n  terminal_cmd = \":vsplit | terminal\", -- used to spawn a terminal for running tests, for debugging refer to nvim-dap's config\n  dap = { -- debug adapter configuration\n    type = 'node2',\n    request = 'launch',\n    cwd = vim.fn.getcwd(),\n    runtimeArgs = {'--inspect-brk', '$path_to_jest', '--no-coverage', '-t', '$result', '--', '$file'},\n    args = { '--no-cache' },\n    sourceMaps = false,\n    protocol = 'inspector',\n    skipFiles = {'\u003cnode_internals\u003e/**/*.js'},\n    console = 'integratedTerminal',\n    port = 9229,\n    disableOptimisticBPs = true\n  }\n}\n```\n\nYou can also overwrite the options for each function call, for example\n\n```lua\n:lua require\"jester\".debug({ dap = { console = \"externalTerminal\" } })\n```\n\n## Tip\n\nJest usually transforms the files causing breakpoints to be inserted in the wrong line.\nTo prevent this, add this `.babelrc` file to your project's root:\n\n```json\n{\n  \"retainLines\": true,\n  \"sourceMap\": \"inline\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavid-Kunz%2Fjester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDavid-Kunz%2Fjester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavid-Kunz%2Fjester/lists"}