-
Notifications
You must be signed in to change notification settings - Fork 276
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
Start migration of tests to electron-mocha #1061
Start migration of tests to electron-mocha #1061
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
3d8e551
to
32d37fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine, actually easier than I thought, dependency changes aside, but I think that's because time-math has no stubs/mocks, right?
My comments are mostly just questions, so I'm hitting approve.
Yes, I chose the simplest one to get it along with the infrastructure changes 🤣 |
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?
@babel/plugin-transform-modules-commonjs
is used to convert ES6 into common js while we don't move fully to ES6.c8
dependency, which has the same purpose asnyc
, that of a code coverage runner around mocha. Had to use this one because nyc doesn't work with electron-mocha. Anyway, c8 is considered the native replacement to nyc, and the output is exactly the same."test:electron-mocha-main"
, which is used in the test pipeline.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.