{"id":13412602,"url":"https://github.com/klen/nvim-test","last_synced_at":"2025-07-27T17:07:16.780Z","repository":{"id":38379014,"uuid":"443057073","full_name":"klen/nvim-test","owner":"klen","description":"A Neovim wrapper for running tests","archived":false,"fork":false,"pushed_at":"2024-01-08T20:27:59.000Z","size":123,"stargazers_count":190,"open_issues_count":20,"forks_count":25,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-17T10:13:16.983Z","etag":null,"topics":["neovim","testing"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klen.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,"dei":null}},"created_at":"2021-12-30T11:38:18.000Z","updated_at":"2025-06-13T17:01:05.000Z","dependencies_parsed_at":"2024-04-12T06:02:20.669Z","dependency_job_id":"1857c11b-2aa3-42b7-bcf3-998fcf2bce31","html_url":"https://github.com/klen/nvim-test","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/klen/nvim-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fnvim-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fnvim-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fnvim-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fnvim-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klen","download_url":"https://codeload.github.com/klen/nvim-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fnvim-test/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267392562,"owners_count":24079919,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["neovim","testing"],"created_at":"2024-07-30T20:01:26.663Z","updated_at":"2025-07-27T17:07:16.748Z","avatar_url":"https://github.com/klen.png","language":"Lua","readme":"\u003cimg src=\"https://neovim.io/logos/neovim-mark-flat.png\" align=\"right\" width=\"144\" /\u003e\n\n# nvim-test 1.4.1\n\nTest Runner for neovim\n\n[![tests](https://github.com/klen/nvim-test/actions/workflows/tests.yml/badge.svg)](https://github.com/klen/nvim-test/actions/workflows/tests.yml)\n[![Awesome Neovim](https://awesome.re/badge-flat.svg)](https://github.com/rockerBOO/awesome-neovim)\n\n\n## Features\n\n| Language       | Test Runners                     |\n| -------------: | :------------------------------- |\n| **C Sharp**    | `dotnet test`                    |\n| **Go**         | `go-test`                        |\n| **Haskell**    | `hspec`, `stack`                 |\n| **Javascript** | `jest`, `mocha`                  |\n| **Lua**        | `busted`, `vusted`               |\n| **Python**     | `pytest`, `pyunit`               |\n| **Ruby**       | `rspec`                          |\n| **Rust**       | `cargo-test`                     |\n| **Typescript** | `jest`, `mocha`, `ts-mocha`      |\n\n## Install\n\nwith [packer](https://github.com/wbthomason/packer.nvim):\n\n```lua\n\nuse {\n  \"klen/nvim-test\",\n  config = function()\n    require('nvim-test').setup()\n  end\n}\n```\n\n## Commands\n\nThe plugin defines the commands:\n\n- `TestSuite` - run the whole test suite\n- `TestFile` - run all tests for the current file\n- `TestEdit` - edit tests for the current file\n- `TestNearest` - run the test nearest to the cursor\n- `TestLast` - rerun the latest test\n- `TestVisit` - open the last run test in the current buffer\n- `TestInfo` - show an information about the plugin\n\n## Setup\n\nThis plugin must be explicitly enabled by using `require(\"nvim-test\").setup{}`\n\nDefault options:\n\n```lua\nrequire('nvim-test').setup {\n  run = true,                 -- run tests (using for debug)\n  commands_create = true,     -- create commands (TestFile, TestLast, ...)\n  filename_modifier = \":.\",   -- modify filenames before tests run(:h filename-modifiers)\n  silent = false,             -- less notifications\n  term = \"terminal\",          -- a terminal to run (\"terminal\"|\"toggleterm\")\n  termOpts = {\n    direction = \"vertical\",   -- terminal's direction (\"horizontal\"|\"vertical\"|\"float\")\n    width = 96,               -- terminal's width (for vertical|float)\n    height = 24,              -- terminal's height (for horizontal|float)\n    go_back = false,          -- return focus to original window after executing\n    stopinsert = \"auto\",      -- exit from insert mode (true|false|\"auto\")\n    keep_one = true,          -- keep only one terminal for testing\n  },\n  runners = {               -- setup tests runners\n    cs = \"nvim-test.runners.dotnet\",\n    go = \"nvim-test.runners.go-test\",\n    haskell = \"nvim-test.runners.hspec\",\n    javascriptreact = \"nvim-test.runners.jest\",\n    javascript = \"nvim-test.runners.jest\",\n    lua = \"nvim-test.runners.busted\",\n    python = \"nvim-test.runners.pytest\",\n    ruby = \"nvim-test.runners.rspec\",\n    rust = \"nvim-test.runners.cargo-test\",\n    typescript = \"nvim-test.runners.jest\",\n    typescriptreact = \"nvim-test.runners.jest\",\n  }\n}\n```\n\nSetup a runner:\n```lua\n  require('nvim-test.runners.jest'):setup {\n    command = \"~/node_modules/.bin/jest\",                                       -- a command to run the test runner\n    args = { \"--collectCoverage=false\" },                                       -- default arguments\n    env = { CUSTOM_VAR = 'value' },                                             -- custom environment variables\n\n    file_pattern = \"\\\\v(__tests__/.*|(spec|test))\\\\.(js|jsx|coffee|ts|tsx)$\",   -- determine whether a file is a testfile\n    find_files = { \"{name}.test.{ext}\", \"{name}.spec.{ext}\" },                  -- find testfile for a file\n\n    filename_modifier = nil,                                                    -- modify filename before tests run (:h filename-modifiers)\n    working_directory = nil,                                                    -- set working directory (cwd by default)\n  }\n```\n","funding_links":[],"categories":["Test","Lua"],"sub_categories":["Quickfix"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fnvim-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklen%2Fnvim-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fnvim-test/lists"}