feat(tools): add tests for check version url script#2526
Conversation
✅ Deploy Preview for kuma ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive test coverage for the check-version-urls.sh script to prevent regressions in version URL detection. The test suite creates temporary git repositories to simulate real diff scenarios and validates all the script's core functionality including pattern matching, comment suppression, and path exclusions.
Key Changes
- New bash test script following the established testing pattern from
test-validate-frontmatter.sh - 13 test cases covering success and failure scenarios for hardcoded version URL detection
- Temporary git repository setup per test for proper isolation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bartsmykla
left a comment
There was a problem hiding this comment.
I would suggest to use shellspec as writing own "small" testing framework might seem to be not an issue now, but might result in harder maintainability when the amount of tests will grow in the future
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
- add shellspec to mise.toml - rewrite tests using shellspec BDD framework - delete custom test framework Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
24faf0b to
90aff1f
Compare

Motivation
Add test coverage for check-version-urls.sh to prevent regressions
Implementation information
Bash test script following existing pattern from test-validate-frontmatter.sh. Creates temp git repos per test to simulate real git diff scenarios. Tests cover:
Supporting documentation
N/A