Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
test-50-fs-runtime-layer-3: use "Buffer.from" instead of "new Buffer"
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon authored and jesec committed Jun 2, 2021
1 parent baaee90 commit 1d6b908
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test-50-fs-runtime-layer-3/test-x-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test01();
function test01() {
fs.open(theFile, 'w+', function (error, fd) {
console.log(error === null);
var buffer = new Buffer('FOO');
var buffer = Buffer.from('FOO');
fs.write(fd, buffer, 0, buffer.length, null, function (error2) {
console.log(error2 === null);
if (error2) console.log(error2.message);
Expand All @@ -31,7 +31,7 @@ function test01() {

function test02() {
var fd = fs.openSync(theFile, 'w+');
var buffer = new Buffer('QUX BARABAZ');
var buffer = Buffer.from('QUX BARABAZ');
var bytesWritten;
try {
bytesWritten = fs.writeSync(fd, buffer, 0, buffer.length);
Expand Down

0 comments on commit 1d6b908

Please sign in to comment.