Skip to content

build: replace ts-mocha with mocha + ts-node/register#154

Merged
buffcode merged 1 commit into
masterfrom
build/replace-ts-mocha
Apr 21, 2026
Merged

build: replace ts-mocha with mocha + ts-node/register#154
buffcode merged 1 commit into
masterfrom
build/replace-ts-mocha

Conversation

@buffcode

Copy link
Copy Markdown
Owner

Summary

  • Removes unmaintained ts-mocha (last release a year ago; incompatible peer-dep for mocha 11+) and replaces it with direct mocha + ts-node/register — the same mechanism ts-mocha wraps.
  • Adds .mocharc.cjs that registers ts-node and points TS_NODE_PROJECT at test/tsconfig.json (which the root tsconfig excludes).
  • No change in test behavior: 108/108 tests pass, yarn coverage still reports 100%.

Test plan

  • yarn test — 108 passing
  • yarn coverage — 100% statements/branches/functions/lines
  • yarn install — no peer-dep warnings

🤖 Generated with Claude Code

ts-mocha is unmaintained and incompatible with mocha 11+. Drop the
wrapper and invoke mocha directly with ts-node/register, which is what
ts-mocha itself wrapped. Configuration lives in .mocharc.cjs so
TS_NODE_PROJECT points at test/tsconfig.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@buffcode buffcode self-assigned this Apr 21, 2026
@buffcode buffcode merged commit 801f0df into master Apr 21, 2026
7 checks passed
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.

1 participant