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

🧪 Tests: Add tests for remaining functions in src/types #8

Open
3 tasks done
JoshuaKGoldberg opened this issue Feb 6, 2023 · 0 comments
Open
3 tasks done
Labels
area: testing Improving how the repository's tests are run and/or code is tested 🧪 good first issue Good for newcomers, please hop on! 🙌 status: accepting prs Please, send a pull request to resolve this! 🙏

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

#6 added a first round of unit tests. Let's add some more tests! 🙌

The src/types folder is not yet fully tested. This issue tracks adding in tests for the rest of its exported functions.

Additional Info

See #6 for examples of tests: including those that work with AST nodes and/or type checking.

There might be existing tests in https://github.com/ajafff/tsutils that are relevant here. If you do find them, it's fine to copy & paste them over - as long as there's a comment like this above any area of copy & pasted code (or on top of a file if the entire file is copy & pasted):

// Code largely based on https://github.com/ajafff/tsutils
// Original license: https://github.com/ajafff/tsutils/blob/26b195358ec36d59f00333115aa3ffd9611ca78b/LICENSE
@JoshuaKGoldberg JoshuaKGoldberg added good first issue Good for newcomers, please hop on! 🙌 area: testing Improving how the repository's tests are run and/or code is tested 🧪 status: accepting prs Please, send a pull request to resolve this! 🙏 labels Feb 6, 2023
JoshuaKGoldberg added a commit that referenced this issue Jun 15, 2023
## PR Checklist

- [x] Addresses an existing open issue: starts on #7, #8, #9, #10, #11,
#12, #13, #14
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

I had some time on a road trip today and was motivated to backfill some
tests 😄. Doesn't add in 100% coverage on any file or really finish any
of the linked issues. Just raises test coverage across the board in
general.

Co-authored-by: Rebecca Stevens <rebecca.stevens@outlook.co.nz>
JoshuaKGoldberg added a commit that referenced this issue Aug 18, 2023
## PR Checklist

- [x] Addresses an existing open issue: continues on #7, #8
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/ts-api-utils/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

It's been bugging me that this package now has >2.5 million downloads
but only has 46% coverage. Which Codecov shows as a red color in the
badge. 😡

No end user impacts here. Just added test coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: testing Improving how the repository's tests are run and/or code is tested 🧪 good first issue Good for newcomers, please hop on! 🙌 status: accepting prs Please, send a pull request to resolve this! 🙏
Projects
None yet
Development

No branches or pull requests

1 participant