add configurable glob test pattern for TSamAll

This commit is contained in:
2026-01-06 16:20:15 +01:00
parent f3350cad98
commit 2d5889dce3
3 changed files with 42 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ Mocha.js runner for the test-samurai Neovim plugin.
- Provides quickfix locations and per-test output.
- Uses `--grep` with escaped patterns to match titles safely, even when running through `npm test`.
- Executes tests via `npx mocha` with the bundled UI + reporter so projects need no extra setup.
- `TSamAll` runs `test/**/*.{test,spec}.{t,j}s` to discover tests reliably.
- `TSamAll` runs `test/**/*.test.js` by default.
## Full Name Convention
@@ -62,6 +62,14 @@ require("test-samurai").setup({
})
```
Override the default glob for `TSamAll`:
```lua
require("test-samurai-mocha-runner").setup({
all_test_glob = "test/**/*.test.js",
})
```
## Development
Run tests: