Commit Graph

5 Commits

Author SHA1 Message Date
Livia Medeiros
74e0ca3f49
test: use tmpdir.resolve() in fs tests
PR-URL: https://github.com/nodejs/node/pull/49125
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2023-08-15 13:45:14 +00:00
LiviaMedeiros
e7e12553fd
test: reduce fs-write-optional-params flakiness
PR-URL: https://github.com/nodejs/node/pull/46238
Fixes: https://github.com/nodejs/node/issues/46144
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-01-20 02:03:59 +08:00
Deokjin Kim
49be0ac4ac
test: enable more case of bad buffer in fs.write
Passing to the `string` parameter an object with an own
`toString` function is no longer supported.(DEP0162)
So use such case as bad buffer in test.

Refs: https://github.com/nodejs/node/blob/main/doc/api/deprecations.md#dep0162-fswrite-fswritefilesync-coercion-to-string
PR-URL: https://github.com/nodejs/node/pull/46236
Refs: https://github.com/nodejs/node/pull/42796
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-19 15:39:45 +00:00
Livia Medeiros
050d974a25
test: use common.mustNotMutateObjectDeep() in fs tests
PR-URL: https://github.com/nodejs/node/pull/43819
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-24 14:29:06 +01:00
LiviaMedeiros
c100f9ad29
fs: make params in writing methods optional
This change allows passing objects as "named parameters":
- `fs.write(fd, buffer[, options], callback)`
- `fs.writeSync(fd, buffer[, options])`
- `filehandle.write(buffer[, options])`

Fixes: https://github.com/nodejs/node/issues/41666

PR-URL: https://github.com/nodejs/node/pull/42601
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-05-18 00:49:23 +08:00