🧪 Testing: Fill in test coverage for createESLintRC #701
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
Bug Report Checklist
main
branch of the repository.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.
createESLintRC
is missing unit test coverage for several dozen lines. ThecreateESLintRC
function doesn't have a dedicatedcreateESLintRC.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:exclude*
options being enabledexclude*
options being enabledI'd suggest using Vitest's
toMatchInlineSnapshot
to save yourself some time writing the tests.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.
The text was updated successfully, but these errors were encountered: