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

Electron mocha renderer migration #1065

Merged

Conversation

araujoarthur0
Copy link
Collaborator

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.

Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

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

Copy link
Collaborator

@tupaschoal tupaschoal left a comment

Choose a reason for hiding this comment

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

Not sure I understood it fully, but seems pretty organized. Having the call count seems nice!

@tupaschoal tupaschoal merged commit 23f0560 into TTLApp:main Mar 10, 2024
9 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