Skip to content

test: add full coverage for design-system validators#144

Closed
go165 wants to merge 1 commit into
Disciplr-Org:mainfrom
go165:go165/test-design-validators
Closed

test: add full coverage for design-system validators#144
go165 wants to merge 1 commit into
Disciplr-Org:mainfrom
go165:go165/test-design-validators

Conversation

@go165

@go165 go165 commented Jun 17, 2026

Copy link
Copy Markdown

Fixes #131

This adds a dedicated validators.test.ts suite covering every exported validator in design-system/src/utils/validators.ts, including color formats, token naming, color accessibility metadata, chart surface tokens, categorical ramps, sequential ramps, and undersized/malformed rejection paths.

Verification:

  • From design-system/: npm test -- --coverage --runInBand src/__tests__/validators.test.ts src/__tests__/tokens.test.ts src/__tests__/chart-tokens.test.ts
  • Result: 3 suites passed, 25 tests passed; validators.ts reported 100% statements, branches, functions, and lines.
  • git diff --check

Payout address: 0x1f0130669ca6fd02e025a984cc038f139df19a2f

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for design-system validators.ts (isValidColorToken, isValidChartTokens)

2 participants