test: add decoration provider, integration, and neogit spec files#134
Merged
barrettruth merged 3 commits intomainfrom Feb 25, 2026
Merged
test: add decoration provider, integration, and neogit spec files#134barrettruth merged 3 commits intomainfrom
barrettruth merged 3 commits intomainfrom
Conversation
Problem: diffs.nvim blanked 18 Neogit highlight groups globally on attach and fell back to getcwd() plus a subprocess call for repo root detection, with no cache refresh when Neogit lazy-loads new hunks. Solution: adopt three APIs from Neogit PR #1897: - set vim.b.neogit_disable_hunk_highlight = true on attach instead of overriding 18 hl groups globally - read vim.b.neogit_git_dir for reliable repo root resolution - register User NeogitDiffLoaded per-buffer to refresh hunk cache Closes #128
Problem: regressions #119 and #120 exposed gaps in coverage of the decoration provider cache pipeline, the end-to-end highlight pipeline, and Neogit-specific behavior. Solution: add three spec files covering: - decoration_provider_spec: cache population, fingerprint guard, pending_clear semantics, BufWipeout cleanup via _test table - integration_spec: full buffer to attach to extmarks pipeline - neogit_integration_spec: neogit_disable_hunk_highlight and filetype attachment Closes #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Regressions #119 and #120 showed the test suite had no coverage of the decoration provider cache pipeline, no end-to-end pipeline tests from buffer content to extmarks, and no Neogit-specific integration tests.
Solution
Adds three new spec files (28 new tests, 316 total):
spec/decoration_provider_spec.lua— indirect cache pipeline tests via_testtable:ensure_cachepopulation, content fingerprint guard,pending_clearsemantics, BufWipeout cleanupspec/integration_spec.lua— full pipeline: diff buffer →attach→ extmarks; verifiesDiffsAdd/DiffsDeleteon correct lines, treesitter captures, multi-hunk coveragespec/neogit_integration_spec.lua—neogit_disable_hunk_highlightbehavior, NeogitStatus/NeogitDiffView attach and cache population, parser neogit filename patternsDepends on #133.
Closes #122