Skip to content

fix: schema tests for spacing and color tokens#519

Open
Kureszn wants to merge 1 commit into
Disciplr-Org:mainfrom
Kureszn:fix/spacing-color-schema-tests
Open

fix: schema tests for spacing and color tokens#519
Kureszn wants to merge 1 commit into
Disciplr-Org:mainfrom
Kureszn:fix/spacing-color-schema-tests

Conversation

@Kureszn

@Kureszn Kureszn commented Jun 27, 2026

Copy link
Copy Markdown

Closes #334

- Add spacing-color-schema.test.ts: validates DTCG dimension leaves,
  monotonic 8px spacing scale, container token ordering, no unexpected
  top-level keys, all color leaves pass isValidColorToken, semantic
  groups and neutral scale have paired light/dark variants

- Fix validators.ts: isValidColorToken used truthy guard on
  .accessibility and .colorblindSimulation, causing null/array/primitive
  values to bypass validation and return true. Changed to !== undefined
  checks with explicit Array.isArray guards.

- Fix token-loader.test.ts: warn call count was hardcoded to 6 but
  getAllTokens now loads 7 files (z-index.json was added). Updated
  expectation to 7.
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Kureszn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@GBOYEE

GBOYEE commented Jun 28, 2026

Copy link
Copy Markdown

@GBOYEE has applied to work on this issue as part of the Stellar Wave Program's 6th wave.

I'll analyze the root cause, implement a targeted fix with tests, and ensure CI passes. Clean PR incoming within the deadline.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @GBOYEE to this issue.

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 Jest tests for design-system spacing and colors token JSON shape

2 participants