Skip to content

Commit 7de1152

Browse files
author
Venkata Subramani Renduchintala
committed
docs(tests): move Tests section to test/README.md
1 parent fe004ba commit 7de1152

2 files changed

Lines changed: 36 additions & 29 deletions

File tree

README.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,35 +32,7 @@ Plugin-specific mappings live in `lua/plugins/configs/`. LSP mappings are define
3232
3333
# Tests
3434
35-
The `test/` directory contains a headless CI suite that runs inside the devcontainer image. All steps are orchestrated by `test/ci_validate.sh`.
36-
37-
## Test scripts
38-
39-
- **`test/ci_install_plugins.lua`** — boots lazy.nvim in headless mode and runs `lazy.sync()`. Fails with exit code 1 if lazy.nvim is not loadable or the sync step errors.
40-
41-
- **`test/ci_validate_lsp.lua`** — verifies the native LSP layer loads without errors:
42-
- `require("lsp")` succeeds (global capabilities set via `vim.lsp.config('*', {...})`)
43-
- `vim.lsp.config["*"]` contains the expected capabilities table
44-
- Spot-checks that each `after/lsp/<name>.lua` file was sourced by asserting `vim.lsp.config[name].settings` is present for: `gopls`, `lua_ls`, `rust_analyzer`, `yamlls`, `helm_ls`, `eslint`, `ansiblels`, `jsonnet_ls`
45-
46-
- **`test/install_parsers.lua`** — installs all treesitter parsers via `TSInstall!` in headless mode, then polls until all `.so` files appear on disk (timeout: 5 min). Fails if any parser times out.
47-
- Parsers: `go`, `terraform`, `hcl`, `yaml`, `bash`, `gotmpl`, `dockerfile`, `jsonnet`, `python`, `markdown`, `markdown_inline`
48-
49-
- **`test/validate_treesitter.lua`** — loads each parser against a real source fixture and calls `parser:parse()`. Fails if any parser cannot be loaded or produces no parse trees.
50-
51-
## Test fixtures
52-
53-
| File | Parser(s) tested |
54-
|------|-----------------|
55-
| `fixtures/hello.go` | `go` |
56-
| `fixtures/main.tf` | `terraform` |
57-
| `fixtures/deployment.yaml` | `yaml` |
58-
| `fixtures/script.sh` | `bash` |
59-
| `fixtures/helm_deployment.yaml` | `gotmpl` |
60-
| `fixtures/Dockerfile` | `dockerfile` |
61-
| `fixtures/dashboard.jsonnet` | `jsonnet` |
62-
| `fixtures/script.py` | `python` |
63-
| `fixtures/README.md` | `markdown`, `markdown_inline` |
35+
See [`test/README.md`](test/README.md) for the full test suite documentation — scripts, fixtures and what each validates.
6436
6537
<br>
6638

test/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Tests
2+
3+
The `test/` directory contains a headless CI suite that runs inside the devcontainer image. All steps are orchestrated by `ci_validate.sh`.
4+
5+
## Test scripts
6+
7+
- **`ci_install_plugins.lua`** — boots lazy.nvim in headless mode and runs `lazy.sync()`. Fails with exit code 1 if lazy.nvim is not loadable or the sync step errors.
8+
9+
- **`ci_validate_lsp.lua`** — verifies the native LSP layer loads without errors:
10+
- `require("lsp")` succeeds (global capabilities set via `vim.lsp.config('*', {...})`)
11+
- `vim.lsp.config["*"]` contains the expected capabilities table
12+
- Spot-checks that each `after/lsp/<name>.lua` file was sourced by asserting `vim.lsp.config[name].settings` is present for: `gopls`, `lua_ls`, `rust_analyzer`, `yamlls`, `helm_ls`, `eslint`, `ansiblels`, `jsonnet_ls`
13+
14+
- **`install_parsers.lua`** — installs all treesitter parsers via `TSInstall!` in headless mode, then polls until all `.so` files appear on disk (timeout: 5 min). Fails if any parser times out.
15+
- Parsers: `go`, `terraform`, `hcl`, `yaml`, `bash`, `gotmpl`, `dockerfile`, `jsonnet`, `python`, `markdown`, `markdown_inline`
16+
17+
- **`validate_treesitter.lua`** — loads each parser against a real source fixture and calls `parser:parse()`. Fails if any parser cannot be loaded or produces no parse trees.
18+
19+
## Test fixtures
20+
21+
| File | Parser(s) tested |
22+
|------|-----------------|
23+
| `fixtures/hello.go` | `go` |
24+
| `fixtures/main.tf` | `terraform` |
25+
| `fixtures/deployment.yaml` | `yaml` |
26+
| `fixtures/script.sh` | `bash` |
27+
| `fixtures/helm_deployment.yaml` | `gotmpl` |
28+
| `fixtures/Dockerfile` | `dockerfile` |
29+
| `fixtures/dashboard.jsonnet` | `jsonnet` |
30+
| `fixtures/script.py` | `python` |
31+
| `fixtures/README.md` | `markdown`, `markdown_inline` |
32+
33+
## Running locally
34+
35+
See [Running the CI pipeline locally](../README.md#running-the-ci-pipeline-locally) in the root README.

0 commit comments

Comments
 (0)