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

Migrate to vitest #1431

Merged
merged 4 commits into from
Feb 10, 2024
Merged

Migrate to vitest #1431

merged 4 commits into from
Feb 10, 2024

Conversation

cany748
Copy link
Contributor

@cany748 cany748 commented Feb 1, 2024

Issue: #1417

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • issue was opened to discuss proposed changes before starting implementation. It is important do discuss changes before implementing them (Why should we add it? How should it work? How should it look? Where will it be? ...).
  • during development, node version specified in package.json was used (ie using nvm).
  • package versions and package-lock.json were not changed (npm install --no-save).
  • app version number was not changed.
  • all new code has tests to ensure against regressions.
  • npm run lint reports no offenses.
  • npm run test is error-free.
  • README and CHANGELOG were updated accordingly.
  • after PR is approved, all commits in it are squashed

Description of the Change

Verification Process

Other information

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (efc25a9) 72.39% compared to head (4f7f011) 13.71%.

Additional details and impacted files
@@             Coverage Diff             @@
##            trunk    #1431       +/-   ##
===========================================
- Coverage   72.39%   13.71%   -58.69%     
===========================================
  Files          14       27       +13     
  Lines         355     1845     +1490     
===========================================
- Hits          257      253        -4     
- Misses         98     1592     +1494     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hovancik
Copy link
Owner

hovancik commented Feb 1, 2024

Thanks! Will need to find time to check the changes, but Coverage seems to not go through

@hovancik
Copy link
Owner

hovancik commented Feb 3, 2024

I am also getting The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

@cany748
Copy link
Contributor Author

cany748 commented Feb 9, 2024

I am also getting The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

There's nothing wrong with that, electron now supports ESIM and it will be easy to switch in the future

@cany748
Copy link
Contributor Author

cany748 commented Feb 9, 2024

I fixed the coverage, but there are some differences:

  1. Vitest takes into account not only files in the app/utils folder, but also the entire app folder. This can be easily fixed by setting coverage: { include: ["app/utils"] }
  2. Vitest also counts files without tests as 0% coverage. I believe this is the correct behavior, but if you disagree with me, this can also be changed via configuration.
  3. We will need to create separate tests for the defaultBreakIdeas.js anddefaultMicrobreakIdeas.js files.

Otherwise, coverage is very similar

@hovancik
Copy link
Owner

hovancik commented Feb 9, 2024

Thanks! I don't really care about the coverage number, I usually only look on difference when having new commits so looks good!

@hovancik hovancik merged commit df7520d into hovancik:trunk Feb 10, 2024
4 of 5 checks passed
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.

2 participants