-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Tests fails on Windows #11568
Comments
That pdf doesn't show anything, could you share a text file please? |
Hi @asvishnyakov 👋 I see the failing tests in your Log.txt - out of curiosity, if you run one of the test files from the list of failing tests by itself (e.g. When running all 3000+ tests locally they can be flaky, so I can't say whether this is Windows-specific yet :) @phryneas has offered to try on his Windows machine, but I'm without one at the moment. If none of the tests fail when run on their own, I can add a disclaimer to call local test flakiness out in our CONTRIBUTING.md and will otherwise close this out. Thanks! |
Okay, I'm quite flabbergasted here. Some notes: Running the tests in WSL without Now, if you have a super new version of So Instead, you have to call node --expose-gc ./node_modules/jest/bin/jest.js --config ./config/jest.config.js --runInBand With that, the tests pass just fine in WSL2. But then I tested the tests on plain Windows, and it's the weirdest thing: React is rendering differently in that environment. Like, even executing individual tests, I have a completely different rendering behaviour. So this is an example of a test that would need these changes: I honestly don't know what is going on there. @jerelmiller you have worked a lot with those tests - you have any idea here? => I think so far we can recommend WSL with |
@phryneas I'm not really sure to be honest, though some of those tests that failed are tests that have flaked in the past in CI. Would be nice to update those |
@alessbell Yep, individually they fails too. @phryneas So, what's the conclusion if I want to do some contributions? Use Linux or run only related tests in WSL on Windows? :) |
@asvishnyakov To be honest, I'd highly recommend you to use WSL2 (or any other unix of your choice) for contributing to AC at this point. I understand that Windows is a perfectly valid lifestyle choice (as I personally would much prefer using Linux than the Macbooks we have to use here at Apollo 😉), but none of us core developers uses Windows for AC development, and it's probably a herculean effort to get the tests play nicely on there. On the positive side, Visual Studio Code integrates very nicely with WSL2 nowadays, and developing JS is even faster and more consistent there than on a normal NTFS file system. |
Well, I tried to look up at some render results and it interesting. Just in case it somehow someone helps:
with act() - failed:
without
but success:
|
In an unrelated take of events, I just tried to swap I know I can't give you any satisfying answer right now, but at least though I'd share that finding. |
@phryneas I'll try to run tests in WSL and if it will work, I think it should be enough just to mention about that in your contribution guidelines. Thank you for your help! |
Hi @asvishnyakov - did you have better luck with WSL? If so I can update CONTRIBUTING.md, thanks! |
@alessbell Hi! No, I moved to Linux (for another reason) so this issue is no longer actual for me 😀 |
Thanks for letting us know! In that case I'm going to go ahead and close this for now - I've added the |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
Issue Description
I'm just trying to follow contribution guidelines.
I already fixed the error on build, but when I'm trying to run
npm run test
, I receive the following errors:Log.pdf
Do you have suggestions what may cause this?
Link to Reproduction
N/A
Reproduction Steps
npm install
npm run build
npm run test
@apollo/client
version3.9.2
The text was updated successfully, but these errors were encountered: