-
Notifications
You must be signed in to change notification settings - Fork 74
[Local Dev][Bug] - @oclif/core tests are not hermetic #1364
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
Comments
This issue has been linked to a new work item: W-18398048 |
@spanishpear Are you still seeing this? I don't have a windows machine to test on but the tests are passing for me on both mac and linux Also worth mentioning that our unit tests run in CI against windows, mac, and linux - and they all pass. Although it could be that you're using WSL now that I think about it If it's a WSL specific issue, I won't be able to find the time to fix this. Especially since we don't officially support WSL. However, I'd be happy to review and merge a PR if you are interested in submitting one |
@mdonnalley Hey! Yeah, I just rebased and get the same failures
So it might indeed be something WSL specific ⁉ |
Okay, looks like the tests are actually failing as expected, because the tests are wrong 😅 There is code that explicitly sets Line 332 in 42f37b6
However the "expected" output for the test is setup to use core/test/command/main.test.ts Line 7 in 42f37b6
As such we end with the following failure. -@oclif/core/4.3.2 wsl-x64 node-v22.16.0
+@oclif/core/4.3.2 linux-x64 node-v22.16.0 So, the test fails... but because the expected output is incorrect, and not testing reality! To make matters even more interesting, there are other failing tests that stub core/test/config/config.test.ts Line 251 in 42f37b6
but because the implementation is effectively Line 332 in 42f37b6
stubbing Tracing back, it seems it was added in oclif/config 1.16 There are only two usages of Potential avenues forward...
I will probably submit a PR for the first option if you're happy with that direction @mdonnalley ? |
@spanishpear thanks for writeup! The first option sounds good to me. I'm also happy with the second option if the first doesn't work out |
Uh oh!
There was an error while loading. Please reload this page.
Hi folks!
Context
I was writing #1363 and when running the local devloop outlined in CONTRIBUTING.md - the tests as per
yarn test
failed, as the
oclif --version
command was returning a different architechtureSimilarly the darwin tests fail, because, well - I'm not on darwin ;)
Report
this resulted in 11 failing tests locally:
when running on WSL!
The text was updated successfully, but these errors were encountered: