aboutsummaryrefslogtreecommitdiff
path: root/test/harness.lua
Commit message (Collapse)AuthorAge
* fix(unitests): also print stacktrace from childbfredl2026-09-29
| | | | | | | yes NVIM_TEST_TRACE_LEVEL does exist but simply displaying the stacktrace of the error should not be opt in. Now that we "own" the harness we can borrow some harness code for the child to only print spec file lines and not testutil lines.
* test(harness): support `{retries=…}`Justin M. Keyes2026-08-25
| | | | | | | | | | | | | Problem: Cannot retry a test with its full `after_each`/`before_each` lifecycle. Solution: - Overload `it()` to accept an `opts` param: ``` it('flaky', { retries = 2 }, function(ctx) end) -- 3 attempts. ``` - Pass `ctx` to test functions. - Fix a bug in `t.read_file_list()`.
* test(harness): migrate away from magic globalsJustin M. Keyes2026-07-21
| | | | | | | | | | | | | | | | | | | | | Problem: The magic globals `it`, `describe`, etc., are more trouble than they are worth. - Hooking into `after_each` requires `getfenv()` hacks. - They confuse luals/emmylua, because the top-level `.luarc.json` isn't merged with `test/.luarc.json` (apparently a luals limitation?) - They totally defeat discoverability because the user just has to "know" about the various magic symbols. So they harm DX, which means they serve no purpose at all. Solution: - Expose the test API from `testutil`, so tests can call `t.it()`, `t.describe()`, etc., in the conventional way. - Drop `getfenv()` hacks. - Drop the `setfenv()` injection in `load_chunk`. - Drop `test/_meta.lua`.
* fix(test): check for SIGINT between testsbfredl2026-06-04
| | | | | | | when running `zig build functionaltest`, it might take a while until the test harness nvim instance checks for interrupts, which causes a lot of tests to keep running after CTRL+C. Check after each test instead
* fix(build.zig): do not depend on b.install_path on configure timebfredl2026-06-04
| | | | | | | | | | | | | | This is in preparation of zig 0.17 where b.install_path is no longer known inside `pub fn build()`. Builds which should hardcode a runtime path into the binary has to specify it. We could use a nlua0 helper to encode the install path at build time but I think this is cleaner anyway. (like currently the appimage still encodes a temporary build path which is nonsensical, it is better to just include none) Similarily b.args will not be available anymore (there will just be an opaque pass-through)
* fix(test): support multiple --filter-out #39885Natanael Copa2026-05-20
| | | | fixes regression introduced in commit 55f9c2136e52 (test: replace busted with local harness)
* ci: drop cirrus #39321Justin M. Keyes2026-04-22
| | | | | | | | Problem: cirrus will shutdown soon, and we are running out of minutes anyway, which causes ci failures. Solution: Drop cirrus config.
* test: include test path in summary (#39141)zeertzjq2026-04-17
| | | Ref: https://github.com/neovim/neovim/pull/38486#discussion_r3088483987
* test: replace busted with local harnessLewis Russell2026-04-15
Replace the busted-based Lua test runner with a repo-local harness. The new harness runs spec files directly under `nvim -ll`, ships its own reporter and lightweight `luassert` shim, and keeps the helper/preload flow used by the functional and unit test suites. Keep the file boundary model shallow and busted-like by restoring `_G`, `package.loaded`, `package.preload`, `arg`, and the process environment between files, without carrying extra reset APIs or custom assertion machinery. Update the build and test entrypoints to use the new runner, add black-box coverage for the harness itself, and drop the bundled busted/luacheck dependency path. AI-assisted: Codex