-
Notifications
You must be signed in to change notification settings - Fork 86
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
fs.statSync no longer mocked from NodeJS 20.8.0 #380
Comments
theoludwig
added a commit
to leon-ai/leon-cli
that referenced
this issue
Nov 14, 2023
github-merge-queue bot
pushed a commit
to aws/jsii-rosetta
that referenced
this issue
Nov 15, 2023
We are affected by this `mock-fs` bug: tschaub/mock-fs#380 Seems like there is no activity on the repo recently, so we switch to a new tool. However `memfs` only works for the test case in `assemblies.test.ts`. So we keep `mock-fs` for the `rosetta.test.ts` test cases. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
58 tasks
This was referenced Nov 20, 2023
I am also facing issues on Node 20 with |
patrickjuchli
added a commit
to patrickjuchli/basic-ftp
that referenced
this issue
Dec 9, 2023
Mock-FS is no longer reliable, see tschaub/mock-fs#380. Rewrite tests to use real file system instead.
This pushed me to just use async methods instead of |
hegemonic
added a commit
to hegemonic/jsdoc-baseline
that referenced
this issue
Dec 20, 2023
It has some nasty, hard-to-fix bugs in current versions of Node.js (tschaub/mock-fs#377, tschaub/mock-fs#380) and an uncertain future (tschaub/mock-fs#383). Also, this package's tests don't really need to mock the entire filesystem; they just need to write files to a temp directory that can be deleted when the tests are complete.
Thanks @fregante! This works! |
aws-cdk-automation
pushed a commit
to aws/jsii-rosetta
that referenced
this issue
Jan 10, 2024
We are affected by this `mock-fs` bug: tschaub/mock-fs#380 Seems like there is no activity on the repo recently, so we switch to a new tool. However `memfs` only works for the test case in `assemblies.test.ts`. So we keep `mock-fs` for the `rosetta.test.ts` test cases. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit f25a394) # Conflicts: # .projen/deps.json # .projen/tasks.json # package.json # yarn.lock
aws-cdk-automation
pushed a commit
to aws/jsii-rosetta
that referenced
this issue
Jan 10, 2024
We are affected by this `mock-fs` bug: tschaub/mock-fs#380 Seems like there is no activity on the repo recently, so we switch to a new tool. However `memfs` only works for the test case in `assemblies.test.ts`. So we keep `mock-fs` for the `rosetta.test.ts` test cases. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit f25a394) # Conflicts: # .projen/deps.json # .projen/tasks.json # package.json # yarn.lock
aws-cdk-automation
pushed a commit
to aws/jsii-rosetta
that referenced
this issue
Jan 10, 2024
We are affected by this `mock-fs` bug: tschaub/mock-fs#380 Seems like there is no activity on the repo recently, so we switch to a new tool. However `memfs` only works for the test case in `assemblies.test.ts`. So we keep `mock-fs` for the `rosetta.test.ts` test cases. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit f25a394) # Conflicts: # .projen/deps.json # .projen/tasks.json # package.json # yarn.lock
aws-cdk-automation
pushed a commit
to aws/jsii-rosetta
that referenced
this issue
Jan 10, 2024
We are affected by this `mock-fs` bug: tschaub/mock-fs#380 Seems like there is no activity on the repo recently, so we switch to a new tool. However `memfs` only works for the test case in `assemblies.test.ts`. So we keep `mock-fs` for the `rosetta.test.ts` test cases. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit f25a394) # Conflicts: # .projen/deps.json # .projen/tasks.json # package.json # yarn.lock
aws-cdk-automation
pushed a commit
to aws/jsii-rosetta
that referenced
this issue
Jan 10, 2024
We are affected by this `mock-fs` bug: tschaub/mock-fs#380 Seems like there is no activity on the repo recently, so we switch to a new tool. However `memfs` only works for the test case in `assemblies.test.ts`. So we keep `mock-fs` for the `rosetta.test.ts` test cases. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 (cherry picked from commit f25a394) # Conflicts: # .projen/deps.json # .projen/tasks.json # package.json # yarn.lock
theoludwig
added a commit
to theoludwig/html-w3c-validator
that referenced
this issue
Jan 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mocking with
mock-fs
and callfs.statSync
no longer mocks from v20.8.0https://nodejs.org/en/blog/release/v20.8.0
I believe this is due to performance improvements in fs.*Sync methods from this commit: https://github.com/nodejs/node/pull/49593/files#diff-9b2c5bf36570be7a09ba2597abdf6d9bc2cc1e19866b6674b0cf275c1188dcad
All *Sync commans hae moved to syncFs.
The text was updated successfully, but these errors were encountered: