thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
463 stars 272 forks source link

Start migration of tests to electron-mocha #1061

Closed araujoarthur0 closed 9 months ago

araujoarthur0 commented 9 months ago

Related issue

Helps #1037

Context / Background

Refer to #1054. Here I'm starting to migrate our tests to the electron-mocha infrastructure, which works well with ES6 modules. I think I'll only be able to pre-migrate the ones that don't depend on jest-specific things, before switching fully to ES6. Starting with the simple test tests/main/time-math.js as an example here.

What change is being introduced by this PR?

How will this be tested?

Pipeline passes in the same way, coverage will be coming from two reports and is currently being merged into a single report. CodeCov is properly parsing the combination.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8f2ae80) 80.00% compared to head (9b9c47b) 81.37%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1061 +/- ## ========================================== + Coverage 80.00% 81.37% +1.37% ========================================== Files 20 22 +2 Lines 1270 1401 +131 Branches 191 214 +23 ========================================== + Hits 1016 1140 +124 - Misses 254 261 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

araujoarthur0 commented 9 months ago

Seems fine, actually easier than I thought, dependency changes aside, but I think that's because time-math has no stubs/mocks, right?

Yes, I chose the simplest one to get it along with the infrastructure changes 🤣