test(dialtone-docs): DLT-3268 refactor test suite — consolidate, remove hardcoded values, add CI workflow#1183
Merged
belumontoya merged 3 commits intostagingfrom Apr 10, 2026
Conversation
…ve hardcoded values, add CI workflow
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27920e2bcb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Ignacio Ropolo (iropolo)
approved these changes
Apr 8, 2026
Brad Paugh (braddialpad)
approved these changes
Apr 8, 2026
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.
test(dialtone-docs): DLT-3268 refactor test suite
Obligatory GIF (super important!)
🛠️ Type Of Change
📖 Jira Ticket
https://dialpad.atlassian.net/browse/DLT-3268
📖 Description
Consolidates the
dialtone-docstest suite from 6 files / 45 tests down to 3 files / 29 tests, and adds a CI workflow.Files created
tests/tests/schema.test.js— Mergesfrontmatter.test.js+build-output.test.jsinto a single file with sharedALLOWED_TYPESconstant. Validates source markdown frontmatter schema (6 tests) and compiledai-docs.jsonoutput schema (11 tests).tests/tests/content-quality.test.js— Replaces hardcoded file lists with dynamic discovery. UsesreaddirSyncto discover category directories at runtime and verify each has anINDEX.md. Also validates no placeholder text (TODO/FIXME/TBD) in prose and that Handlebars templates exist insrc/templates/..github/workflows/docs_tests.yml— New CI workflow that runspnpm nx run dialtone-docs:teston PRs and pushes to staging touchingpackages/dialtone-docs/**.Files deleted
tests/tests/completeness.test.js— Hardcoded file lists per category (broke every time a doc was added/removed)tests/tests/frontmatter.test.js— Merged intoschema.test.jstests/tests/searchability.test.js— Hardcoded content term assertions (not structural)tests/tests/structure.test.js— Config file existence checks (near-zero value)tests/tests/build-output.test.js— Merged intoschema.test.jstests/helpers/markdownParser.js— 333 lines of unused helper code (never imported by any test)Unchanged
tests/tests/strip-markdown.test.js— 8 unit tests, untouched💡 Context
The
dialtone-docstest suite had scaling problems:ALLOWED_TYPESduplicated — defined identically infrontmatter.test.jsandbuild-output.test.jsmarkdownParser.js(333 lines) was never imported by any testAll remaining tests now validate structure and schema only — they never break when docs content changes.
📝 Checklist