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

feat: add the plugin:vitest/recommended in extends array #822

Merged

Conversation

jdwilkin4
Copy link
Contributor

@jdwilkin4 jdwilkin4 commented Sep 10, 2023

PR Checklist

Overview

This PR is responsible for adding the plugin:vitest/recommended to the extends array in the .eslintrc.cjs file.

This PR also updates a few of the tests because once the plugin:vitest/recommended was added, some of the tests failed the lint checks.

For the following files, I replaced the toEqual methods with the toBe methods per the vitest recommendations

  • src/bin/index.test.ts
  • src/shared/doesRepositoryExist.test.ts
  • src/shared/runOrRestore.test.ts
  • src/steps/writing/creation/dotGitHub/createWorkflowFile.test.ts

For the following files, I replaced the toBe(undefined) with toBeUndefined() per the vitest recommendations

  • src/shared/options/readGitAndNpmDefaults/readTitleFromReadme.test.ts
  • src/shared/tryCatchLazyValueAsync.test.ts

@codecov
Copy link

codecov bot commented Sep 10, 2023

Codecov Report

Merging #822 (7b23e5b) into main (c66fdda) will increase coverage by 0.56%.
Report is 4 commits behind head on main.
The diff coverage is 80.50%.

@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   91.61%   92.18%   +0.56%     
==========================================
  Files          84       84              
  Lines        4161     4220      +59     
  Branches      248      261      +13     
==========================================
+ Hits         3812     3890      +78     
+ Misses        349      330      -19     
Flag Coverage Δ
create 71.95% <78.12%> (-0.09%) ⬇️
initialize 34.61% <81.25%> (+0.52%) ⬆️
migrate 73.27% <79.16%> (-0.08%) ⬇️
unit 52.51% <78.81%> (+4.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/shared/types.ts 0.00% <0.00%> (ø)
src/shared/options/augmentOptionsWithExcludes.ts 62.09% <50.00%> (-0.49%) ⬇️
src/bin/index.ts 100.00% <100.00%> (ø)
src/bin/mode.ts 100.00% <100.00%> (ø)
src/create/index.ts 89.04% <100.00%> (+0.15%) ⬆️
src/initialize/index.ts 97.77% <100.00%> (+0.05%) ⬆️
src/migrate/index.ts 97.56% <100.00%> (+0.06%) ⬆️
src/shared/options/readOptions.ts 89.23% <100.00%> (+15.89%) ⬆️
src/steps/uninstallPackages.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Love it! Very close, just one thought on using a Vitest API instead of a disable comment. Thoughts?

src/steps/initializeBranchProtectionSettings.test.ts Outdated Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Sep 11, 2023
@github-actions github-actions bot removed the status: waiting for author Needs an action taken by the original poster label Sep 11, 2023
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 thanks!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 501ddb2 into JoshuaKGoldberg:main Sep 19, 2023
15 of 16 checks passed
@github-actions
Copy link

🎉 This is included in version v1.29.41 🎉

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Extend from plugin:vitest/recommended in .eslintrc.cjs
2 participants