Skip to content

Commit e23dd56

Browse files
committed
test: make maxWrite multibyte partial write deterministic
1 parent 68e37c4 commit e23dd56

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/write.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ function buildTests (test, sync) {
253253
const MAX_WRITE = 65535
254254
fakeFs.write = function (fd, buf, ...args) {
255255
// only write byteLength === MAX_WRITE
256-
const _buf = Buffer.from(buf).subarray(0, MAX_WRITE).toString()
257-
fs.write(fd, _buf, ...args)
256+
const _buf = Buffer.from(buf).subarray(0, MAX_WRITE)
257+
fs.writeSync(fd, _buf)
258258
setImmediate(args[args.length - 1], null, MAX_WRITE)
259259
fakeFs.write = function (fd, buf, ...args) {
260260
fs.write(fd, buf, ...args)

0 commit comments

Comments
 (0)