Skip to content

🛠 Tooling: Add more unit testing around src/setup #471

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

Closed
3 tasks done
JoshuaKGoldberg opened this issue May 22, 2023 · 1 comment · Fixed by #684
Closed
3 tasks done

🛠 Tooling: Add more unit testing around src/setup #471

JoshuaKGoldberg opened this issue May 22, 2023 · 1 comment · Fixed by #684
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

#469 added a bunch of code under src/setup/. But it didn't completely unit test everything! Shame on me. 😄

I'm filing this tracking issue for adding more unit test coverage to files in that folder. Accepting PRs that add any amount of tests - you don't have to unit test everything. In fact, I'd recommend starting with simpler functions first.

Additional Info

Tip: for the more complex functions, see how other more-complex functions are tested.

It may not be worth unit testing src/setup/index.ts itself or the other more complex functions. 100% unit test coverage can be an annoying metric to go for.

This is a sibling issue to #447.

@JoshuaKGoldberg JoshuaKGoldberg added good first issue Good for newcomers, please hop on! status: accepting prs Please, send a pull request to resolve this! area: testing Improving how the repository's tests are run and/or code is tested labels May 22, 2023
JoshuaKGoldberg added a commit that referenced this issue Jun 14, 2023
## PR Checklist

- [x] Addresses an existing open issue: makes progress on #471
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Adds a trio of test files. Doesn't exhaustively increase coverage (I
want to leave that open to future contributors!), but hopefully gets us
to a nicer green coverage badge in the README.md
JoshuaKGoldberg added a commit that referenced this issue Aug 22, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #471
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Gets through the rest of the relatively straightforward unit tests.

At this point I think we can consider #471 to be resolved. Unit test
coverage is >89%.
@github-actions
Copy link

🎉 This is included in version v1.29.1 🎉

The release is available on:

Cheers! 📦🚀

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

Successfully merging a pull request may close this issue.

1 participant