fix(test): resolve busted migration test isolation issues (#25)
* fix(test): resolve busted migration test isolation issues
Problem: Two issues introduced during the plenary-to-busted migration
(6be0148). First, altbuf_spec waited for two BufEnter events but
oil:// → file resolution only fires one async BufEnter (the synchronous
one from vim.cmd.edit fires before wait_for_autocmd is registered).
Second, reset_editor kept the first window which could be a preview
window with stale oil_preview/oil_source_win state, causing
close_preview_window_if_not_in_oil to close the wrong window in
subsequent tests.
Solution: Wait for a single BufEnter in the altbuf test. Replace the
window-keeping logic in reset_editor with vim.cmd.new() +
vim.cmd.only() to guarantee a fresh window with no inherited state.
This also fixes the preview_spec.lua:30 timeout which had the same
root cause. 114/114 tests pass.
* fix(ci): fix nightly tests and remove unused Makefile
Problem: Neovim nightly's ftplugin/markdown.lua now calls
vim.treesitter.start() unconditionally, which crashes in CI where the
markdown parser is not installed. The Makefile is unused — CI runs
selene, stylua, and nvim-busted-action directly.
Solution: Change filetype plugin indent on to filetype on in
minimal_init.lua. Tests only need filetype detection for
vim.bo.filetype assertions, not ftplugin or indent loading. Remove
the Makefile.
This commit is contained in:
parent
36cc369de3
commit
92ff4d5774
4 changed files with 3 additions and 52 deletions
44
Makefile
44
Makefile
|
|
@ -1,44 +0,0 @@
|
|||
## help: print this help message
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo 'Usage:'
|
||||
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
|
||||
|
||||
## all: lint and run tests
|
||||
.PHONY: all
|
||||
all: lint test
|
||||
|
||||
## test: run tests
|
||||
.PHONY: test
|
||||
test:
|
||||
luarocks test --local
|
||||
|
||||
## lint: run selene and stylua
|
||||
.PHONY: lint
|
||||
lint:
|
||||
selene --display-style quiet .
|
||||
stylua --check lua spec
|
||||
|
||||
## profile: use LuaJIT profiler to profile the plugin
|
||||
.PHONY: profile
|
||||
profile: scripts/benchmark.nvim
|
||||
nvim --clean -u perf/bootstrap.lua -c 'lua jit_profile()'
|
||||
|
||||
## flame_profile: create a trace in the chrome profiler format
|
||||
.PHONY: flame_profile
|
||||
flame_profile: scripts/benchmark.nvim
|
||||
nvim --clean -u perf/bootstrap.lua -c 'lua flame_profile()'
|
||||
|
||||
## benchmark: benchmark performance opening directory with many files
|
||||
.PHONY: benchmark
|
||||
benchmark: scripts/benchmark.nvim
|
||||
nvim --clean -u perf/bootstrap.lua -c 'lua benchmark()'
|
||||
@cat perf/tmp/benchmark.txt
|
||||
|
||||
scripts/benchmark.nvim:
|
||||
git clone https://github.com/stevearc/benchmark.nvim scripts/benchmark.nvim
|
||||
|
||||
## clean: reset the repository to a clean state
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf perf/tmp profile.json
|
||||
Loading…
Add table
Add a link
Reference in a new issue