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

🧪 Testing: Fill in test coverage for createDevelopment #700

Closed
3 tasks done
JoshuaKGoldberg opened this issue Aug 25, 2023 · 1 comment
Closed
3 tasks done

🧪 Testing: Fill in test coverage for createDevelopment #700

JoshuaKGoldberg opened this issue Aug 25, 2023 · 1 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! type: cleanup Tech debt or other code/repository cleanups

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Aug 25, 2023

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

#695 added a bunch of code changes. I didn't fully unit test them - not because I was too impatient to write tests (me?! never!!), but because I wanted to leave some good first issues as followups. Definitely that.

createDevelopment is missing unit test coverage for several dozen lines. The createDevelopment function doesn't have a dedicated createDevelopment.test.ts file. Let's make one!

Additional Info

We don't need a single unit test per && case. That would be quite annoying to write & maintain! Instead, I think maybe a couple tests would be fine:

  • One test for all exclude* options being enabled
  • One test for no exclude* options being enabled

If the tests are giving you grief, feel free to send an incomplete Draft PR with comments asking for help. ❤️


Note that the code might have been refactored since this issue was filed. Names might be slightly off. The general spirit of this issue should still be valid though.

@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 type: cleanup Tech debt or other code/repository cleanups labels Aug 25, 2023
@JoshuaKGoldberg
Copy link
Owner Author

Oop, looks like this has 100% unit test coverage. Thanks for pointing out @DemianParkhomenko!

For any issue around filling in test coverage: I might coincidentally accidentally fix it without noticing 😅. But in general, any code logic missing unit test coverage is fair game!

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@JoshuaKGoldberg JoshuaKGoldberg removed the status: accepting prs Please, send a pull request to resolve this! label Jan 16, 2024
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! type: cleanup Tech debt or other code/repository cleanups
Projects
None yet
Development

No branches or pull requests

1 participant