summaryrefslogtreecommitdiff
path: root/tests/unit_node/fs_test.ts
AgeCommit message (Collapse)Author
2024-10-27fix(ext/node): add path to `fs.stat` and `fs.statSync` error (#26037)familyboat
2024-10-23fix(ext/node): map `ERROR_INVALID_NAME` to `ENOENT` on windows (#26475)Yoshiya Hinosawa
In libuv on windows, `ERROR_INVALID_NAME` is mapped to `ENOENT`, but it is mapped to `EINVAL` in our compat implementation, which causes the issue #24899. ref: https://github.com/libuv/libuv/blob/d4ab6fbba4669935a6bc23645372dfe4ac29ab39/src/win/error.c#L138 closes #24899 closes #26411 closes #23635 closes #21165 closes #19067
2024-10-17chore: fix flaky COPYFILE_EXCL test (#26370)Nathan Whitaker
It was missing an await
2024-10-17fix(node/fs): copyFile with `COPYFILE_EXCL` should not throw if the ↵Nathan Whitaker
destination doesn't exist (#26360) Fixes #26313. We were checking for the NotFound error, but still calling the callback with the error / throwing.
2024-10-08fix(ext/node): internal buffer length in readSync (#26064)Satya Rohith
Closes https://github.com/denoland/deno/issues/26054
2024-09-10feat(cli): use NotCapable error for permission errors (#25431)Luca Casonato
Closes #7394 --------- Co-authored-by: snek <snek@deno.com>
2024-07-25chore: update to `std@2024.07.19` (#24715)Asher Gomez
2024-05-28fix(ext/node/fs): `position` argument not applied (#24009)Marvin Hagemeister
We didn't honour the `position` options of `fd.read` and `fd.write` because we checked if the buffer is of type `Buffer` instead of just `Uint8Array`. Node does the latter. In doing so I noticed that the file handle id was written to a public property which it definitely shouldn't be. This was probably a typo. Fixes https://github.com/denoland/deno/issues/23707
2024-05-28fix(ext/node): add `throwIfNoEntry` option in `fs.lstatSync` (#24006)Marvin Hagemeister
We didn't support the `throwIfNoEntry` option for Node's `fs.lstatSync` method. Note that the async variant doesn't have this option. Fixes https://github.com/denoland/deno/issues/23996
2024-04-08fix(ext/node): out-of-order writes of fs.createWriteStream (#23244)Yoshiya Hinosawa
This PR follows this fix (https://github.com/nodejs/node/pull/52005) in Node.js. Stream's construct callback happens one tick earlier by this change, and it prevents the reordering of the first few chunks in `node:stream.Writable` closes #20284
2024-03-06fix(node): stat/statSync returns instance of fs.Stats (#22294)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22291 --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-02-13chore: use `@std` import instead of `@test_util/std` (#22398)Asher Gomez
This PR: 1. Replaces `@test_util/std`-prefixed imports with `@std`. 2. Adds `@std/` import map entries to a few `deno.json` files.
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.