writeGlobalUserCore now line-surgery upserts only the [core] keys it owns into the existing file content — no read-parse-merge-emit round-trip. Hand edits in shapes the minimal parseSimpleToml dropped (arrays, single-quoted strings, dotted/quoted keys, \uXXXX escapes, custom sections) survive byte-for-byte. Dead emitTomlSections helper removed. writeModuleTomls emits core's shipped defaults under top-level [core], not nested [modules.core] — matches where writeCentralConfig writes core deltas and where resolve_config.py consumers read core.* from. tomlString auto-infers TOML type from --set values: true/false → bool, integer pattern → int, decimal pattern → float, otherwise quoted string. Explicit-string escape hatch: --set k='"true"' writes "true" as a string. Previously every --set value was wrapped in quotes, so --set bmm.workers=4 wrote "4" and downstream numeric comparisons broke. upsertTomlKey's inline-comment detector now tracks double-quoted string state via findInlineCommentStart, so a # inside a basic-string value (legal per the TOML spec, contrary to the previous defending comment) is no longer truncated. tomlHasKey and upsertTomlKey both use a new isSectionHeader matcher that tolerates trailing inline comments on the header line and walks every section occurrence — fixes mis-routing on hand-edited files with [core] # comment headers or duplicate sections. Python test harnesses (test_resolve_config.py, test_resolve_customization_cascade.py) now force BMAD_HOME to the synthetic isolation path unconditionally instead of env.get(BMAD_HOME, default), which was a no-op when the developer had BMAD_HOME set in their shell. Adds 21 JS assertions covering the new behaviors directly: tomlString type inference, # inside string values, inline-comment headers, and writeGlobalUserCore round-trip preservation of hand-edited shapes. Tests: 405 JS + 21 Python pass. Lint, markdownlint, prettier green. |
||
|---|---|---|
| .. | ||
| adversarial-review-tests | ||
| fixtures/file-refs-csv | ||
| README.md | ||
| test-file-refs-csv.js | ||
| test-installation-components.js | ||
| test-installer-channels.js | ||
| test-parse-source-urls.js | ||
| test-rehype-plugins.mjs | ||
| test-workflow-path-regex.js | ||
README.md
Test Suite
Tests for the BMAD-METHOD tooling infrastructure.
Quick Start
# Run all quality checks
npm run quality
# Run individual test suites
npm run test:install # Installation component tests
npm run test:refs # File reference CSV tests
npm run validate:refs # File reference validation (strict)
Test Scripts
Installation Component Tests
File: test/test-installation-components.js
Validates that the installer compiles and assembles agents correctly.
File Reference Tests
File: test/test-file-refs-csv.js
Tests the CSV-based file reference validation logic.
Test Fixtures
Located in test/fixtures/:
test/fixtures/
└── file-refs-csv/ # Fixtures for file reference CSV tests