Skip to content

chore: hoist shared snapshot/selector test fixtures into a single canonical location #2402

Description

@thymikee

Purpose

PR #2397 (selector pipeline move into @agent-device/selectors) introduced a second copy of shared test fixtures, forced by the layering rule that packages cannot import root src/:

  • packages/selectors/src/internal/__tests__/snapshot-builders.ts mirrors root src/__tests__/test-utils/snapshot-builders.ts (duplicated makeSnapshotState; root copy keeps buildNodes for remaining root tests).
  • packages/selectors/src/internal/__tests__/property-arbitraries.ts holds selector-chain arbitraries beside root src/__tests__/test-utils/property-arbitraries.ts (replay/gesture arbitraries).

Required behavior

  • Shared test fixtures (snapshot builders, selector arbitraries) live in one canonical location; both root tests and packages/selectors tests import from it.
  • Options: (a) a new test-fixtures subpath on @agent-device/selectors that root re-imports, or (b) a shared test-utils package. Choose whichever fits the existing layering model (root may import packages; packages may not import root src/).

Observable completion

  • Exactly one copy of each fixture helper exists in the repo.
  • Root and package tests import it through the chosen subpath/package.
  • pnpm check:affected --run passes.

Dependencies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions