vscode-wordpress-hooks
vscode-wordpress-hooks copied to clipboard
Add comprehensive test coverage and refactor extension
Summary
- ✅ Added comprehensive test infrastructure using @vscode/test-cli and mocha
- ✅ Created 17 tests covering all major functionality
- ✅ Refactored monolithic 618-line extension.ts into clean modular structure (now 14 lines!)
- ✅ Updated CI/CD workflow to run tests
- ✅ Updated documentation with test instructions
Test Coverage
The test suite includes:
- Hook completion (actions and filters)
- Callback completion (closures, arrow functions, utility functions)
- Hover provider with documentation links
- Edge cases (all hook functions, quotes, whitespace handling)
Breaking Changes
None - this is purely internal refactoring with comprehensive test coverage to ensure functionality remains unchanged.