Skip to content

Add catwalk differ boundary tests for agent add/remove and empty arrays #210

Description

@williamthorsen

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.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions