refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
73
orig/.opencode/commands/write-tests.md
Normal file
73
orig/.opencode/commands/write-tests.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Write Comprehensive Tests
|
||||
|
||||
Write comprehensive tests for the following functionality: $ARGUMENTS
|
||||
|
||||
## Testing Framework:
|
||||
1. **Test Planning**: Design test cases for all scenarios
|
||||
2. **Unit Testing**: Implement unit tests with high coverage
|
||||
3. **Integration Testing**: Create integration tests for component interactions
|
||||
4. **Property-Based Testing**: Implement property-based tests for mathematical functions
|
||||
5. **Fuzz Testing**: Add fuzz tests for edge cases
|
||||
6. **Benchmark Testing**: Create benchmarks for performance-critical code
|
||||
|
||||
## Testing Standards:
|
||||
- **Coverage Targets**: >90% for Go, >95% for Solidity, >85% for JavaScript
|
||||
- **Test Organization**: Follow language-specific testing conventions
|
||||
- **Test Data**: Use realistic test data and edge cases
|
||||
- **Test Documentation**: Document test scenarios and expected outcomes
|
||||
|
||||
## Language-Specific Testing:
|
||||
|
||||
### Go Testing
|
||||
```go
|
||||
// Unit tests with table-driven approach
|
||||
func TestFunctionName(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
input InputType
|
||||
expected OutputType
|
||||
wantErr bool
|
||||
}{
|
||||
// Test cases
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Test implementation
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Solidity Testing
|
||||
```solidity
|
||||
// Property-based testing with Foundry
|
||||
function testFuzz_ValidInputs_AlwaysWork(uint256 amount) public {
|
||||
vm.assume(amount > 0 && amount < type(uint128).max);
|
||||
// Test implementation
|
||||
}
|
||||
```
|
||||
|
||||
### JavaScript Testing
|
||||
```javascript
|
||||
// Vue component testing with Vitest
|
||||
describe('ComponentName', () => {
|
||||
it('should render correctly', () => {
|
||||
// Test implementation
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
## Test Categories:
|
||||
- **Happy Path**: Tests for expected normal operation
|
||||
- **Edge Cases**: Tests for boundary conditions
|
||||
- **Error Conditions**: Tests for error handling
|
||||
- **Security**: Tests for potential vulnerabilities
|
||||
- **Performance**: Benchmarks for critical functions
|
||||
|
||||
## Deliverables:
|
||||
- Comprehensive test suite with high coverage
|
||||
- Property-based tests for mathematical functions
|
||||
- Fuzz tests for edge cases
|
||||
- Benchmark tests for performance-critical code
|
||||
- Test documentation and scenarios
|
||||
Reference in New Issue
Block a user