tkmpypy / neotest-rust

Neotest adapter for Rust, using cargo-nextest.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

neotest-rust

Neotest adapter for Rust, using cargo-nextest.

Requires nvim-treesitter and the parser for Rust.

require("neotest").setup({
  adapters = {
    require("neotest-rust")
  }
})

Supports standard library tests, rstest, Tokio's [#tokio::test], and more. Does not support rstest's parametrized tests.

Limitations

  • Does not support running the whole test suite, only individual tests or files.
  • Assumes unit tests in main.rs, mod.rs, and lib.rs are in a tests module.
  • Does not support rstest's #[case] macro.
  • When running tests for a main.rs in an integration test subdirectory (e.g. tests/testsuite/main.rs), all tests in that subdirectory will be run (e.g. all tests in tests/testsuite/). This is because Cargo lacks the capability to specify a test file.

About

Neotest adapter for Rust, using cargo-nextest.

License:MIT License


Languages

Language:Lua 90.1%Language:Rust 4.1%Language:Shell 2.6%Language:Makefile 2.6%Language:Vim Script 0.6%