-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
test(ext/node): Port _fs_writeFile_test.ts from deno_std #19524
Conversation
There are two main points I'm having difficult with, which are:
|
writeFile( | ||
"_fs_writeFile_test_file.txt", | ||
value, | ||
encoding as TextEncodings, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you just skip as TextEncodings
bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It complais: Argument of type 'string' is not assignable to parameter of type 'WriteFileOptions'
. This parameter should be Encodings | CallbackWithError | WriteFileOptions | undefined
, with type Encodings = BinaryEncodings | TextEncodings
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I guess as any
will be required here as well
@fbaltor Please run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Porting the
node/_fs/_fs_writeFile_test.ts
from deno_std, one of the tasks of the bigger issue #17840.