-
Notifications
You must be signed in to change notification settings - Fork 759
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
repo: update vitest #3191
repo: update vitest #3191
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
9b1ee72
to
429b1a6
Compare
What is the status here? @ScottyPoi can you give a summary what changes are necessary to get this working? Everything "expected" or some unexpected stuff here? |
@holgerd77 the main issue here in the browsers is with core node modules. especially anywhere we use EventEmitters. Using a plugin called This is the current error from those tests:
|
😬 |
works now 👍 |
https://github.com/vitest-dev/vitest/releases They released v1.2 today which includes some fixes to browser mode. |
Browser Tests Pass! Using this as the base config for browser mode handles most issues:
Additional configs in individual packages handle any specific extra requirements. |
Wow the CI passes, super great! I will give this a review tomorrow! |
6012c57
to
8bdcb83
Compare
I'm trying to figure out why coverage went down on certain files, especially in |
Browser-tests passed in dc8b4f6 I don't know why they aren't passing now. The test that fails on here passes locally |
Update:
|
Ah this looks similar to what we had a few weeks back with pinning the vitest dependency. @acolytec3 could you maybe take a look here? |
what do you mean by "pinning"? |
Just putting the dependency to a specific version in package.json rather than |
Ah pinning might not have been the exact right term, I mean changes introduced in for instance this commit: fe1a1dc (note: from the tsx PR) |
packages/wallet/tsconfig.json
Outdated
"include": ["src/**/*.ts", "test/**/*.ts"] | ||
"include": ["src/**/*.ts", "test/**/*.ts"], | ||
"compilerOptions": { | ||
"moduleResolution": "Node16" |
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.
Should we add this elsewhere?
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.
I'm going to do some cleanup on this branch. some of these config edits might be unnecessary.
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.
Sounds good.
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.
This looks great and I can verify that everything is working correctly. Left one comment on tsconfig
(though I think it could be addressed in a future PR.
Cool, thanks! |
0fd417c
to
bd73fab
Compare
caf13ee
to
b4d4bae
Compare
Update: Still around and around with the same issue today. Not sure what else to try. The There is a mismatch between the number of uploaded coverage reports between the base and head being compared. The documentation for Codecov mentions this as a reason for unexpected results, but offers no explicit solution. The The results are inconsistent. All tests pass locally, with the same environment setup and everything. Sometimes all the tests will run and pass. Most of the time, either I have tried various solutions, including editing the workflow file, but have not escaped this particular issue, nor figured out an explanation for why this might happen. One possibility I have not explored is perhaps running all of the browser tests in one workflow causes an issue with resource constraints in github actions. We could try breaking the browser tests up into more than one workflow. |
Maybe put this aside until our call on Wednesday and we can talk some things through there. |
Will close here, since this PR has gotten too extensive. Scotty has already extracted some pre-work to #3266, we can continue/pick up this work here at some point in #3281. Note that it will likely nevertheless be useful to come back to this PR for inspiration/guidance for changes, eventually it might also still make sense to cherry-pick selected commits. |
Vitest has published their first non-beta release a few days ago: https://www.npmjs.com/package/vitest/v/1.0.0
This PR updates vitest. It seems like the browser tests hang 🤔
Note: also a huge impact on
package-lock
, should definitely be reviewed (what are these inserteddev
andpeer
fields?)