BMAD-METHOD/test/unit/config
Jonah Schulte 5e841f9cac test: add comprehensive test coverage for file operations, dependency resolution, and transformations
Implement Vitest testing framework with 287 new tests achieving 80%+ overall coverage for previously untested critical components.

Coverage achievements:
- file-ops.js: 100% (exceeded 95% target)
- xml-utils.js: 100%
- config.js: 89% (exceeded 85% target)
- yaml-xml-builder.js: 86% (close to 90% target)
- dependency-resolver.js: 81%, 100% functions

New test coverage:
- 126 tests for file operations (254+ file system interactions)
- 74 tests for dependency resolution (multi-pass, circular detection)
- 69 tests for YAML/XML transformations (persona merging, XML generation)
- 37 tests for configuration processing (placeholder replacement, validation)
- 18 tests for XML utilities (special character escaping)

Infrastructure improvements:
- Add Vitest 4.0.16 with V8 coverage provider
- Create test helpers for temp directories and fixtures
- Configure ESLint for ES module test files
- Update npm scripts for test execution and coverage
- Maintain 100% backward compatibility with existing tests

Critical scenarios tested:
- Data loss prevention in syncDirectory() with hash/timestamp comparison
- Circular dependency handling in multi-pass resolution
- XML special character escaping to prevent injection
- Unicode filename and content handling
- Large file streaming (10MB+) for hash calculation

All 352 tests (65 existing + 287 new) passing with zero flaky tests.
2026-01-08 11:46:12 -05:00
..
config.test.js test: add comprehensive test coverage for file operations, dependency resolution, and transformations 2026-01-08 11:46:12 -05:00