Skip to content

Tests: data-quality lib (runInventoryDuplicateCheck + cross-entity checks) #39

Description

@TheSevenPens

Spun out from DrawTabDataExplorer#225 (the explorer-side test backfill covers src/lib/data-quality/analysis.ts).

The data-repo's own validation lib lacks focused unit tests. Add Vitest coverage (alongside lib/pressure/pressure.test.ts) for lib/data-quality.ts, prioritizing:

  • runInventoryDuplicateCheck — flags duplicate InventoryId within each inventory collection; UNASSIGNED is exempt; pen vs. tablet namespaces checked independently. (This check recently caught real duplicates: WAP.0075/0038, XPP.0017, WAT.0070.)
  • the cross-entity orphan checks (runCrossEntityChecks) and runBrandDriftCheck while we're in there.

Convention to mirror from the explorer (CLAUDE.md "Extracted helpers ship with tests"): data-repo lib/ helpers should ship with focused unit tests.

Cross-ref: TheSevenPens/DrawTabDataExplorer#225

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions