-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
docs: add TypeScript setup guide #5530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add documentation for using Mocha with TypeScript to help developers avoid common setup issues. - Add TypeScript configuration examples - Include basic test examples - Cover common troubleshooting issues - Add package.json and tsconfig.json templates This addresses frequent questions about TypeScript setup that come up in issues and community discussions.
|
At the highest level, we'll want these docs to be present in both the current site and the new site (https://mochajs.org/next), you can refer to the PRs around #5248 for reference |
|
👋 Just checking in @ashvin2005, is this still something you have time for? |
|
Hi, @mark-wiemer , I've added the TypeScript documentation to both the current docs site and the new docs-next site as requested. The docs are now available in:
Both contain the same content but formatted appropriately for each documentation system. |
|
Thanks @ashvin2005 , is this still a draft PR or is it ready for review? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5530 +/- ##
=======================================
Coverage 93.52% 93.52%
=======================================
Files 57 57
Lines 4465 4465
Branches 918 918
=======================================
Hits 4176 4176
Misses 289 289 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Just a heads up, I don't think ready for re-review as #5529 (comment) has not been addressed. |
|
Hi @JoshuaKGoldberg @mark-wiemer, I've updated the docs based on your feedback. |
|
@ashvin2005 please review past PRs by "TG199" where we migrated wiki content, we need to make sure we update the navigation as well |
Add documentation for using Mocha with TypeScript to help developers avoid common setup issues.
package.jsonandtsconfig.jsontemplatesThis addresses frequent questions about TypeScript setup that come up in issues and community discussions.
PR Checklist
status: accepting prsOverview
This PR introduces a new “TypeScript Setup” section in Mocha’s documentation that provides a step-by-step guide for integrating Mocha with TypeScript.
The new content includes:
tsconfig.json,.mocharc.json, and test scriptsThis documentation aims to make it easier for developers—especially newcomers—to quickly get Mocha running in TypeScript projects without encountering common configuration pitfalls.