refactor: split config validation coverage out of runtime_spec #145

Closed
opened 2026-09-21 18:12:31 +00:00 by barrettruth · 3 comments
Owner

Original issue: barrettruth/diffs.nvim#340
Original author: barrettruth
Original date: 2026-05-13T17:33:49Z

Tracked By

Context

This is pre-v0.4.0 cleanup that should land on main before the hard-removal branch is merged. It must preserve current v0.3.x deprecation behavior.

Problem

spec/runtime_spec.lua mixes two separate concerns:

  • pure config behavior: config.new(), supported config shapes, deprecation/removal migration behavior, compute_filetypes(), and hunk priority config handling
  • runtime behavior: attach, refresh, cache invalidation, window tracking, deferred syntax

That makes future config/vimdoc cleanup harder to review because config expectations are buried inside runtime behavior tests.

Scope

Add spec/config_spec.lua for pure config coverage and leave spec/runtime_spec.lua focused on runtime attach/cache/window behavior.

Acceptance Criteria

  • spec/runtime_spec.lua no longer requires diffs.config
  • current v0.3.x deprecation/migration assertions live in spec/config_spec.lua
  • supported config-shape assertions live in spec/config_spec.lua
  • compute_filetypes() coverage lives in spec/config_spec.lua
  • runtime assertions and behavior are unchanged

Suggested Verification

direnv exec . busted spec/config_spec.lua spec/runtime_spec.lua spec/plugin_spec.lua
> Original issue: barrettruth/diffs.nvim#340 > Original author: `barrettruth` > Original date: 2026-05-13T17:33:49Z ## Tracked By - #315 ## Context This is pre-v0.4.0 cleanup that should land on `main` before the hard-removal branch is merged. It must preserve current v0.3.x deprecation behavior. ## Problem `spec/runtime_spec.lua` mixes two separate concerns: - pure config behavior: `config.new()`, supported config shapes, deprecation/removal migration behavior, `compute_filetypes()`, and hunk priority config handling - runtime behavior: attach, refresh, cache invalidation, window tracking, deferred syntax That makes future config/vimdoc cleanup harder to review because config expectations are buried inside runtime behavior tests. ## Scope Add `spec/config_spec.lua` for pure config coverage and leave `spec/runtime_spec.lua` focused on runtime attach/cache/window behavior. ## Acceptance Criteria - `spec/runtime_spec.lua` no longer requires `diffs.config` - current v0.3.x deprecation/migration assertions live in `spec/config_spec.lua` - supported config-shape assertions live in `spec/config_spec.lua` - `compute_filetypes()` coverage lives in `spec/config_spec.lua` - runtime assertions and behavior are unchanged ## Suggested Verification ```sh direnv exec . busted spec/config_spec.lua spec/runtime_spec.lua spec/plugin_spec.lua ```
barrettruth 2026-09-21 18:12:31 +00:00
Author
Owner

Original comment: barrettruth/diffs.nvim#340, comment 4443842257
Original author: barrettruth
Original date: 2026-05-13T17:54:18Z

Implemented by #345 and merged into the v0.4.0 draft branch.

> Original comment: barrettruth/diffs.nvim#340, comment 4443842257 > Original author: `barrettruth` > Original date: 2026-05-13T17:54:18Z Implemented by #345 and merged into the v0.4.0 draft branch.
Author
Owner

Original comment: barrettruth/diffs.nvim#340, comment 4443860141
Original author: barrettruth
Original date: 2026-05-13T17:56:59Z

Correction: #345 was mistakenly merged into the blocked v0.4.0 hard-removal draft branch, then removed from that draft branch. This issue is still open for the pre-v0.4.0 cleanup stack and should be implemented against fresh .

> Original comment: barrettruth/diffs.nvim#340, comment 4443860141 > Original author: `barrettruth` > Original date: 2026-05-13T17:56:59Z Correction: #345 was mistakenly merged into the blocked v0.4.0 hard-removal draft branch, then removed from that draft branch. This issue is still open for the pre-v0.4.0 cleanup stack and should be implemented against fresh .
Author
Owner

Original comment: barrettruth/diffs.nvim#340, comment 4443860956
Original author: barrettruth
Original date: 2026-05-13T17:57:06Z

Correction: #345 was mistakenly merged into the blocked v0.4.0 hard-removal draft branch, then removed from that draft branch. This issue is still open for the pre-v0.4.0 cleanup stack and should be implemented against fresh origin/main.

> Original comment: barrettruth/diffs.nvim#340, comment 4443860956 > Original author: `barrettruth` > Original date: 2026-05-13T17:57:06Z Correction: #345 was mistakenly merged into the blocked v0.4.0 hard-removal draft branch, then removed from that draft branch. This issue is still open for the pre-v0.4.0 cleanup stack and should be implemented against fresh origin/main.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
barrettruth/diffs.nvim#145
No description provided.