Closed araujoarthur0 closed 1 year ago
Merging #982 (2c19bb7) into main (3040f66) will decrease coverage by
0.14%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## main #982 +/- ##
==========================================
- Coverage 70.38% 70.24% -0.14%
==========================================
Files 27 27
Lines 2161 2188 +27
Branches 323 348 +25
==========================================
+ Hits 1521 1537 +16
- Misses 640 651 +11
Impacted Files | Coverage Δ | |
---|---|---|
js/classes/FlexibleMonthCalendar.js | 60.05% <0.00%> (-0.36%) |
:arrow_down: |
js/main-window.js | 72.56% <0.00%> (-0.41%) |
:arrow_down: |
js/windows.js | 26.92% <0.00%> (ø) |
|
src/preferences.js | 84.26% <0.00%> (ø) |
|
src/workday-waiver.js | 82.52% <0.00%> (+0.26%) |
:arrow_up: |
Related issue
Closes #980
Context / Background
__tests__/__renderer__/workday-waiver.js
is failing due to one of its includes not being written in ES6 and needing transpilation.SyntaxError: Unexpected token 'export'
What change is being introduced by this PR?
Searched for many possible solutions. Seems this might be fixed in newer jest versions, but I think we should go that way after we fix our electron usage. Leveraging a few solutions I found over the internet, this is the only solution I found to be working.
A few sources https://stackoverflow.com/questions/75578896/running-test-with-jest-in-repo-using-yarn-syntaxerror-unexpected-token-export https://stackoverflow.com/questions/49263429/jest-gives-an-error-syntaxerror-unexpected-token-export https://jestjs.io/docs/configuration#transformignorepatterns-arraystring
Changes:
How will this be tested?
Running
npm run test:jest
Update 1:
Also added a node version to Checks.yml so that the CI can work through the Puppeteer include error. This is fixed in newer versions of node.
Update 2: The repo has a patch for jest 3.0.0 and it seems there is a new 3.0.1 for which the patch fails. Changed package.json to force the version we are patching.
Update 3:
Error happening for macos:
This test has a mock fix for Linux, attempting same for macos.
Update 4:
Fixing version of ubuntu to ubuntu-20.04 as actions on ubuntu-latest are getting stuck.
https://github.com/actions/runner-images/issues/6698 https://github.com/actions/runner-images/issues/6704 https://github.com/actions/runner/issues/1819