create runner with ChatGPT-Codex by using the AGENTS.md
Some checks failed
tests / test (push) Failing after 4s
Some checks failed
tests / test (push) Failing after 4s
This commit is contained in:
61
README.md
Normal file
61
README.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# test-samurai-jest-runner.nvim
|
||||
|
||||
Jest.js runner for `test-samurai.nvim`.
|
||||
|
||||
Main plugin: https://gitea.mschirmer.com/m13r/test-samurai.nvim
|
||||
|
||||
## Features
|
||||
|
||||
- Detects Jest test files (`*.test.*`, `*.spec.*`).
|
||||
- Finds nearest `test`/`it` within `describe` blocks.
|
||||
- Builds `npx jest` commands for nearest, file, all, and failed-only runs.
|
||||
- Streams results via a custom Jest reporter using `onTestCaseResult`.
|
||||
- Uses `--testLocationInResults` for Quickfix and `<leader>o` support.
|
||||
|
||||
## Installation (lazy.nvim)
|
||||
|
||||
```lua
|
||||
{
|
||||
"m13r/test-samurai.nvim",
|
||||
dependencies = {
|
||||
"m13r/test-samurai-jest-runner.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("test-samurai").setup({
|
||||
runners = {
|
||||
require("test-samurai-jest-runner"),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
## Local Development (lazy.nvim)
|
||||
|
||||
```lua
|
||||
{
|
||||
"m13r/test-samurai.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"test-samurai-jest-runner.nvim",
|
||||
dir = "/absolute/path/to/test-samurai-jest-runner.nvim",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("test-samurai").setup({
|
||||
runners = {
|
||||
require("test-samurai-jest-runner"),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Use the standard `test-samurai.nvim` commands (e.g. `TSamNearest`, `TSamFile`, `TSamAll`, `TSamFailedOnly`).
|
||||
|
||||
## Notes
|
||||
|
||||
- The reporter lives at `reporter/test_samurai_jest_reporter.js` and is loaded via `--reporters`.
|
||||
- Test names are reported as `Describe/It` for grouping in the listing.
|
||||
Reference in New Issue
Block a user