summaryrefslogtreecommitdiff
path: root/tests/unit_node/_fs/_fs_write_test.ts
AgeCommit message (Collapse)Author
2024-09-11BREAKING(fs): remove `Deno.FsFile.prototype.rid` (#25499)Asher Gomez
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-29test: run `node_unit_tests` with `DENO_FUTURE=1` (#25285)Bartek Iwańczuk
This is blocking https://github.com/denoland/deno/pull/25213. Turns out a bunch of FS APIs are completely broken because they use RIDs (resource IDs) instead of FDs (file descriptors).
2024-08-20chore: enable no-console dlint rule (#25113)David Sherret
2024-08-16fix(node/fs): Use correct offset and length in node:fs.read and write (#25049)Nathan Whitaker
My fix in #25030 was buggy, I forgot to pass the `byteOffset` and `byteLength`. Whoops. I also discovered that fs.read was not respecting the `offset` argument, and we were constructing a new `Buffer` for the callback instead of just passing the original one (which is what node does, and the @types/node definitions also indicate the callback should get the same type). Fixes #25028.
2024-08-14fix(node/fs): node:fs.read and write should accept typed arrays other than ↵Nathan Whitaker
Uint8Array (#25030) Part of #25028. Our underlying read/write operations in `io` assume the buffer is a Uint8Array, but we were passing in other typed arrays (in the case above it was `Int8Array`).
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-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.