-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Overview
Extend the bats testing framework to provide comprehensive test coverage for all 26 hook scripts.
Current State
- Testing framework established with bats
- Sample tests created for:
hooks/commits/gitlint.shhooks/nix/nix-fmt.sh
- Test helper utilities available
- CI integration configured
Requirements
Test Coverage Goals
- 100% of hooks have at least basic tests
- 80%+ code coverage across all hooks
- Edge cases and error conditions tested
- Multi-platform compatibility verified
Hooks Needing Tests
Commits
- commitizen.sh
- commitlint.sh
- gitlint.sh ✅
Nix
- attestation.nix
- nix-build-check.sh
- nix-build.sh
- nix-darwin-check.sh
- nix-flake-check.sh
- nix-fmt.sh ✅
- nix-home-manager-check.sh
- nix-lint.sh
- publish-to-nixpkgs.sh
CI
- github.sh
- gitlint.sh
Configs
- yamlfmt.sh
Terraform
- pluralith.sh
- tfupdate.sh
Web
- css/csslint.sh
- js/eslint.sh
- js/fixmyjs.sh
- js/jshint.sh
- scss/scss-lint.sh
Other
- backup-nixos.sh
- update-vm.sh
- witness.sh
- pluralith.sh (root)
Test Structure
Each test file should include:
- Existence and executability check
- Missing dependency handling
- Success case validation
- Failure case validation
- Edge case handling (empty input, malformed data, etc.)
Deliverables
- Complete test suite for all hooks
- Test documentation updates
- CI passing with all tests
- Coverage report generation
- Performance benchmarks
Success Criteria
- All hooks have corresponding test files
- Tests run successfully on Ubuntu and macOS
- Code coverage >80%
- All tests pass in CI
- Clear documentation for adding new tests
Related
- feat: Implement CI/CD pipeline #26 - CI/CD pipeline implementation
- test(nix): Create test suite for Nix hooks #22 - Nix hooks test suite
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers