diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-20 21:20:40 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-20 21:20:40 +0300 |
| commit | 9e3328a6aaefe4bd1aa0ec3e8bf6e93d6033180b (patch) | |
| tree | f70a6b53facc81a8bddbe5eeee76708e474e3298 /Taskfile.yaml | |
| parent | 1afd19206720af695625dd46ff0ded0dedeef329 (diff) | |
test: add comprehensive test suite for audio and anki packages
- Add tests for audio package (62.8% coverage)
- OpenAI provider tests with mocking
- Provider interface and fallback mechanism tests
- Bulgarian text validation tests
- Audio caching functionality tests
- Add tests for anki package (84.8% coverage)
- CSV generation tests
- APKG package generation tests
- Card management and formatting tests
- Directory scanning and media handling tests
- Add test utilities and mocks
- Mock implementations for external dependencies
- Test helpers for common operations
- Utilities for creating test directories and files
- Update Taskfile.yaml with comprehensive test targets
- test: Run all tests
- test-verbose: Run with verbose output
- test-coverage: Run with coverage report
- test-coverage-html: Generate HTML coverage report
- test-race: Run with race detector
- test-short: Run only short tests
- test-all: Comprehensive suite with coverage and race detection
- clean: Remove build artifacts and test files
- Fix existing image package tests
- Remove tests for non-existent methods
- Update tests to match actual implementation
- Skip tests requiring live OpenAI API
This provides a solid foundation for ensuring code quality and catching regressions.
🤖 Generated with [opencode](https://opencode.ai)
Co-Authored-By: opencode <noreply@opencode.ai>
Diffstat (limited to 'Taskfile.yaml')
| -rw-r--r-- | Taskfile.yaml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Taskfile.yaml b/Taskfile.yaml index 0c8c31f..f4588d1 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -8,8 +8,49 @@ tasks: cmds: - go run ./cmd/totalrecall test: + desc: Run all tests cmds: - go test ./... + + test-verbose: + desc: Run all tests with verbose output + cmds: + - go test -v ./... + + test-coverage: + desc: Run all tests with coverage report + cmds: + - go test -cover ./... + + test-coverage-html: + desc: Run all tests and generate HTML coverage report + cmds: + - go test -coverprofile=coverage.out ./... + - go tool cover -html=coverage.out -o coverage.html + - echo "Coverage report generated at coverage.html" + + test-race: + desc: Run all tests with race detector + cmds: + - go test -race ./... + + test-short: + desc: Run only short tests (skip integration tests) + cmds: + - go test -short ./... + + test-all: + desc: Run comprehensive test suite with coverage and race detection + cmds: + - echo "Running comprehensive test suite..." + - go test -v -race -cover ./... install: cmds: - go install ./cmd/totalrecall + + clean: + desc: Clean build artifacts and test coverage files + cmds: + - rm -f totalrecall + - rm -f coverage.out coverage.html + - go clean -testcache |
