Validation test for design token JSON examples in the technical report - #414
Open
dgtlntv wants to merge 2 commits into
Open
Validation test for design token JSON examples in the technical report#414dgtlntv wants to merge 2 commits into
dgtlntv wants to merge 2 commits into
Conversation
✅ Deploy Preview for designtokensorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
This would address issue #368 |
dgtlntv
force-pushed
the
pr/03-technical-report-tests
branch
from
June 18, 2026 09:19
24f2bf1 to
0426105
Compare
dgtlntv
force-pushed
the
pr/03-technical-report-tests
branch
from
August 15, 2026 14:57
0426105 to
a32cf66
Compare
Contributor
Author
|
Hi @drwpow! Just wanted to check if there’s still interest in this PR. If not, I can close it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(This PR is stacked on top of #412. So the diff also includes the schema package changes from that PR. The new changes in this PR are focused on the added validation test in the technical report package.)
Changes
Adds a Vitest-based validation test for fenced
jsonandjsoncexamples in thetechnical reportspackage.Previously, examples in the technical reports relied on manual inspection. This test automatically extracts examples from the markdown files and validates them against the bundled DTCG JSON Schemas, making it easier to catch invalid examples and markdown/code-block issues.
The test currently checks three things:
jsondo not contain JSONC-only features such as comments$schema, or examples detected as DTCG format/resolver examples, validate against the corresponding bundled schema.Configuration lives in:
The config defines:
Current Result
Running the new test currently reports 37 failures (which I think almost all of them are valid failures). I wasn't sure whether I should fix those issues in this PR or in a follow up PR.
How to Review
Run:
pnpm --filter @dtcg/tr testCheck whether the reported failures are legitimate and whether the test behavior/configuration is appropriate.