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
455 stars 267 forks source link

Electron mocha renderer migration #1065

Closed araujoarthur0 closed 6 months ago

araujoarthur0 commented 6 months ago

Related issue

Helps #1037

Context / Background

Continues from #1061

This one is adding the renderer version of the mocha run. It has to be in a separate npm script because the --renderer switch has to be passed to electron-mocha.

Also, mocha needed a patch because it was getting stuck while opening the tests.

I used themes.js as a sample. I added the sinon package which allows us to add stub functions with call counts, something we used to rely on jest to have. Then I replaced the jquery in the test with stubbed functions since we are not really testing the jquery effects.

codecov[bot] commented 6 months ago

Codecov Report

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

Project coverage is 57.85%. Comparing base (3a4e99f) to head (be788cd).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1065 +/- ## ======================================= Coverage 57.85% 57.85% ======================================= Files 22 22 Lines 3270 3270 Branches 425 425 ======================================= Hits 1892 1892 Misses 1378 1378 ```

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