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
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) forlib/data-quality.ts, prioritizing:runInventoryDuplicateCheck— flags duplicateInventoryIdwithin each inventory collection;UNASSIGNEDis exempt; pen vs. tablet namespaces checked independently. (This check recently caught real duplicates: WAP.0075/0038, XPP.0017, WAT.0070.)runCrossEntityChecks) andrunBrandDriftCheckwhile 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