fix(node/fs): Enable test-fs-read-zero-length.js and test-fs-read-type.js#2692
Merged
cjihrig merged 13 commits intodenoland:mainfrom Sep 25, 2022
Merged
fix(node/fs): Enable test-fs-read-zero-length.js and test-fs-read-type.js#2692cjihrig merged 13 commits intodenoland:mainfrom
test-fs-read-zero-length.js and test-fs-read-type.js#2692cjihrig merged 13 commits intodenoland:mainfrom
Conversation
wafuwafu13
commented
Sep 23, 2022
wafuwafu13
commented
Sep 23, 2022
added 2 commits
September 23, 2022 19:19
Contributor
Author
|
[memo] ./node/_fs/_fs_read_test.ts (uncaught error)
error: TypeError: The "position" argument must be of type bigint or integer. Received null
throw new ERR_INVALID_ARG_TYPE("position", ["integer", "bigint"], position);
^
at __node_internal_ (file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_util.ts:23:11)
at read (file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_read.ts:98:3)
at file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_read_test.ts:33:7
at file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_open.ts:83:17
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.
./node/_fs/_fs_streams_test.ts (uncaught error)
error: TypeError: The "position" argument must be of type bigint or integer. Received null
throw new ERR_INVALID_ARG_TYPE("position", ["integer", "bigint"], position);
^
at __node_internal_ (file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_util.ts:23:11)
at Object.read (file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_read.ts:98:3)
at <computed> (file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_streams.ts:254:8)
at new Promise (<anonymous>)
at ReadStream._read (file:///home/runner/work/deno_std/deno_std/node/_fs/_fs_streams.ts:252:9)
at ReadStream.w.read (file:///home/runner/work/deno_std/deno_std/node/_stream.mjs:10:34273)
at Ql (file:///home/runner/work/deno_std/deno_std/node/_stream.mjs:10:35586)
at processTicksAndRejections (file:///home/runner/work/deno_std/deno_std/node/_next_tick.ts:41:15)
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.
FAILURES
./node/_fs/_fs_read_test.ts (uncaught error)
./node/_fs/_fs_streams_test.ts (uncaught error) |
cjihrig
reviewed
Sep 23, 2022
node/_fs/_fs_read.ts
Outdated
| cb = optOrBufferOrCb; | ||
| } else { | ||
| offset = offsetOrCallback as number; | ||
| if (Number.isNaN(offset)) { |
Contributor
There was a problem hiding this comment.
Should this check be:
validateInteger(offset, 'offset', 0);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
part of: #911