test: add functional tests for config, git adapter, views, keymaps, and bug fixes#78
Merged
dlyongemallo merged 19 commits intomainfrom Mar 31, 2026
Merged
test: add functional tests for config, git adapter, views, keymaps, and bug fixes#78dlyongemallo merged 19 commits intomainfrom
dlyongemallo merged 19 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a broad set of functional/regression tests across Diffview’s config, actions, adapters, and UI components, plus a small documentation clarification in TIPS.md. This fits the codebase’s existing Plenary/Busted functional test suite by expanding coverage for previously-fixed bugs and newly-added features.
Changes:
- Add multiple new functional specs covering config options/features, actions (layout cycling, restore, open-in-new-tab), adapter behaviors, rendering, keymap save/restore, debounce, and various historical bug fixes.
- Extend existing window and git adapter functional specs with additional regression cases.
- Clarify a leader-key/keymap conflict tip in
TIPS.md.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| TIPS.md | Clarifies how <space> in the file panel can intercept <leader> sequences due to buffer-local keymaps. |
| lua/diffview/tests/functional/window_spec.lua | Adds tests ensuring _save_winopts handles global-only options safely. |
| lua/diffview/tests/functional/toggle_spec.lua | Adds functional coverage for diffview.toggle() open/close behavior and arg passthrough. |
| lua/diffview/tests/functional/panel_render_spec.lua | Adds coverage for file panel rendering (folder counts, loading indicator, “clean” messaging) and collapsed-state preservation. |
| lua/diffview/tests/functional/node_spec.lua | Adds comparator tests for file tree node sorting, including custom sort_file. |
| lua/diffview/tests/functional/misc_fixes_spec.lua | Adds regression tests for several historical fixes (oop super call, hg/git guards, config validation, hl style, etc.). |
| lua/diffview/tests/functional/merge_artifacts_spec.lua | Adds tests for merge artifact detection/filtering behavior. |
| lua/diffview/tests/functional/keymap_save_spec.lua | Adds tests for buffer-local keymap save/restore during File:attach_buffer() / :detach_buffer(). |
| lua/diffview/tests/functional/git_adapter_spec.lua | Extends git adapter tests (show/log args, untracked logic, merge-base behavior) and job env expectations. |
| lua/diffview/tests/functional/fold_limit_spec.lua | Adds regression tests ensuring custom fold logic remains removed. |
| lua/diffview/tests/functional/file_history_render_spec.lua | Adds tests for file history rendering logic (stats bars, dates, entry cycling). |
| lua/diffview/tests/functional/debounce_spec.lua | Adds tests for debounce/throttle/timeout/interval utilities in async context. |
| lua/diffview/tests/functional/cycle_layouts_spec.lua | Adds tests for cycle layout defaults, name resolution, and cycling behavior with/without custom config. |
| lua/diffview/tests/functional/config_options_spec.lua | Adds coverage for specific config defaults and setup persistence (always_show_sections, auto_close_on_empty, etc.). |
| lua/diffview/tests/functional/config_features_spec.lua | Adds tests for additional config-driven features and validations (clean_up_buffers, rename_threshold, commit_format, etc.). |
| lua/diffview/tests/functional/closing_guard_spec.lua | Adds regression tests for cancellation/guard logic when views are closing during async updates. |
| lua/diffview/tests/functional/browser_and_restore_spec.lua | Adds tests for commit URL generation, platform browser command selection, open-in-new-tab, and directory restore behaviors. |
| lua/diffview/tests/functional/actions_features_spec.lua | Adds action-focused regression tests (set_layout, copy_hash register, scrollbind cleanup, inlay hints). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ommit_subject_max_length`, `status_icons`
…hreshold`, `diff1_plain`, `commit_format`
79d4a4e to
053ecf3
Compare
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.
No description provided.