Run Go Tests
Run tests based on the argument provided:
Determine scope
- •No argument: run all tests with
go test -v -cover ./... - •Package path (e.g.
./internal/claude/): rungo test -v -cover $ARGUMENTS - •Test name (e.g.
TestEncodePath): find the package containing the test, then rungo test -v -run $ARGUMENTS ./...
Steps
- •Run
go veton the target package first - •Run the tests with
-v -coverflags - •If tests fail:
- •Read the failing test file and the source code it tests
- •Identify the root cause
- •Suggest a fix with specific code changes
- •If all pass: report coverage percentage and any packages with low coverage (<70%)
Output format
Follow the project convention from CLAUDE.md:
- •
[OK]for passing results - •
[X]for failures with details - •
[i]for coverage info