Skip to content
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

Add @mocha/types to improve IDE intellisense in test files #6729

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Dec 19, 2024

This PR adds the @types/mocha package as a dev dependency, to improve IDE instellisense/autocompletion around mocha global symbols (describe, it, beforeEach, etc).

We don't type-check our test files, so this won't help actually catching incorrect usage of those symbols, it's just an affordance for editors.

This is how it looks in WebStorm without the package installed:

mocha-broken-2024-12-19_15.39.11.mp4

And this is with the package:

mocha-autocompletion-2024-12-19_15.38.14.mp4

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.42%. Comparing base (4b7f380) to head (8f914db).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6729   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files         270      270           
  Lines       10194    10194           
  Branches     2433     2433           
=======================================
  Hits        10135    10135           
  Misses         59       59           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya
Copy link
Contributor Author

acelaya commented Dec 20, 2024

We discussed this here https://hypothes-is.slack.com/archives/C1M8NH76X/p1734618358630599, so I'll go ahead and merge it.

@acelaya acelaya merged commit 01d3973 into main Dec 20, 2024
4 checks passed
@acelaya acelaya deleted the mocha-types branch December 20, 2024 09:34
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