Parent: #182
Description
The catwalk config differ (#182) deferred two test coverage items during review. Both are boundary cases where correctness is evident from the implementation but the behavioral contracts are not pinned by tests.
File: packages/factory/src/client/visualizations/catwalk/state/__tests__/catwalk-differ.test.ts
Acceptance criteria
Must have
diffCatwalkConfig integration tests for agent add/remove triggering hasChanges: true — the agents.added.length > 0 and agents.removed.length > 0 paths in the hasChanges computation are exercised at the diffAgents sub-differ level but not at the composer level. Add two tests: one where an agent is added between prev and next (confirm hasChanges: true and agents.added has length 1), and one where an agent is removed.
diffAgents([], []) empty-array boundary test — confirm all three output arrays (stateChanged, added, removed) are empty when both input arrays are empty.
Parent: #182
Description
The catwalk config differ (#182) deferred two test coverage items during review. Both are boundary cases where correctness is evident from the implementation but the behavioral contracts are not pinned by tests.
File:
packages/factory/src/client/visualizations/catwalk/state/__tests__/catwalk-differ.test.tsAcceptance criteria
Must have
diffCatwalkConfigintegration tests for agent add/remove triggeringhasChanges: true— theagents.added.length > 0andagents.removed.length > 0paths in thehasChangescomputation are exercised at thediffAgentssub-differ level but not at the composer level. Add two tests: one where an agent is added between prev and next (confirmhasChanges: trueandagents.addedhas length 1), and one where an agent is removed.diffAgents([], [])empty-array boundary test — confirm all three output arrays (stateChanged,added,removed) are empty when both input arrays are empty.