Skip to content

test: cover git diff mode#14

Merged
V3RON merged 1 commit into
masterfrom
test/git-diff-mode
Jun 24, 2026
Merged

test: cover git diff mode#14
V3RON merged 1 commit into
masterfrom
test/git-diff-mode

Conversation

@V3RON

@V3RON V3RON commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What is this?

This PR adds regression coverage for Sniffler's Git diff mode. The previous tests covered base/head selection through a mocked diff provider, but they did not prove that the default git diff --name-only <base> <head> path works in a real repository.

How does it work?

The new Vitest integration test creates a temporary Sniffler project inside a temporary Git repository, commits a baseline, changes both an impacted file and an unrelated file, and then runs the CLI with real --base and --head SHAs. It verifies both impact JSON output and run mode runner arguments while cleaning up the temporary repository after each test.

Why is this useful?

This gives maintainers confidence that CI-style base/head workflows continue to work through the actual subprocess-backed Git path. It also guards against false positives by confirming that unrelated changed files are reported without selecting extra E2E tests.

Add real temporary Git repository coverage for impact and run base/head selection.
@V3RON V3RON merged commit 00019f8 into master Jun 24, 2026
3 checks passed
@V3RON V3RON deleted the test/git-diff-mode branch June 24, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant