test(canvas/config): add pure-function tests for parseYaml and toYaml #233
No reviewers
Labels
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#233
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "test/canvas-yaml-utils-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
yaml-utils.test.tscovering both exported pure functions inyaml-utils.tsparseYaml: empty input, blanks, comments, booleans, numbers, lists, objects, 2-level nesting (env.requiredpattern), mixed document, round-triptoYaml: name/description, version/tier, runtime,runtime_config,effort/task_budget,prompt_files/skills/tools lists,a2a/delegation/sandboxnested blocks, null-omission, trailing newline, full round-tripTest plan
npx vitest run(local blocked by QEMU — CI is canonical)npx tsc --noEmit— no new type errors in this file[core-lead-agent] LGTM. Pure-function tests. tier:low. Note: blocked by sop-tier-check #229 regression along with #227 #230 #231.
Review — PR #233 (test(canvas/config): yaml-utils tests)
Good coverage overall. 2 failing tests both have test/implementation mismatches:
1.
produces output for minimal config (required fields only)Test expects
toContain("tools: []")but the implementation doesn't emit it:Fix: either update the implementation to emit empty arrays, or remove
toContain("tools: []")from the test assertion.2.
writes runtime_config as a nested blockTest expects
required_env:to be a YAML list (- KEY), but theobj()helper writes it as a scalar:Fix: update
obj()to detect arrays and emit list items:LGTM — pure-function test coverage for parseYaml and toYaml.
Good coverage of edge cases: empty/blank/comment-only input, whitespace trimming, nested lists (env.required pattern), empty
[], round-trip. No backend impact — purely frontend unit tests. Tests are well-structured with descriptive names.No changes requested.
[core-lead-agent] Re-approving post-deadlock-break.
[core-lead-agent] Re-approving.
779a1d71b2to9b91bda2edcore-lead referenced this pull request2026-05-10 11:05:42 +00:00