AdobeDocs / AdobeDocs/adobe-markdown-authoring

Test suite is broken: restore runnable tests and add CI

Open
#78 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
CSS
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Problem

The Mocha + \`@vscode/test-electron\` test suite does not compile, so **no tests can run today**. The test build fails at the TypeScript step:

\`\`\`
$ yarn run build-test
node_modules/@types/markdown-it/lib/index.d.ts(151,33): error TS2694:
Namespace 'LinkifyIt' has no exported member 'LinkifyIt'.
\`\`\`

This is a transitive \`@types\` version drift: \`@types/markdown-it\` expects an older \`@types/linkify-it\` export shape than what currently resolves. Since `compile` (and therefore `yarn test`) depends on `build-test`, the entire suite is dark.

On top of that, two related gaps make the suite untrustworthy even once it compiles:

1. **Silent failure in the test runner.** \`src/test/runTest.ts\` catches any error, prints the generic string \`"Failed to run tests"\`, and calls \`process.exit(1)\` — but never prints the actual error. A broken run gives no diagnostic.
2. **No CI.** There is no \`.github/workflows/\`, so nothing runs the suite on push or PR. A test suite with no CI silently rots.

## Scope (Phase 0 — restore the framework)

- [ ] Fix the \`@types/markdown-it\` / \`@types/linkify-it\` type drift so \`tsc -p ./src/test\` compiles cleanly. (Likely the same \`markdown-it\` v14 bump flagged in Dependabot triage — coordinate with the dependency work.)
- [ ] Fix the swallowed error in \`src/test/runTest.ts\` so a failed run surfaces the real cause (fail loudly).
- [ ] Add a minimal GitHub Actions workflow running \`yarn install\`, \`yarn run build\`, and \`yarn test\` on push and PR.

## Out of scope (later phases)

- Adding test coverage for the markdownlint rule pack (AM001–AM029) — currently 0% covered.
- Migrating transform tests to a lighter runner (Vitest).
- These are tracked separately as Phase 1.

## Acceptance criteria

- \`yarn run build && yarn test\` completes locally with a visible pass/fail count.
- A failed test run prints the underlying error, not a generic message.
- CI runs the suite on every push and PR and reports status.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with yarn run build-test and inspect the dependency resolution behind the @types/markdown-it and @types/linkify-it mismatch. Read src/test/runTest.ts for the swallowed error and add the requested workflow under .github/workflows/. Done means yarn run build && yarn test passes with visible results, failures show their underlying error, and push and pull request CI runs the suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js, typescript
Domain
build-system, ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.