diff --git a/test/fixtures/readProjectFile.js b/test/fixtures/readProjectFile.js index 29775c9ee..8340ba228 100644 --- a/test/fixtures/readProjectFile.js +++ b/test/fixtures/readProjectFile.js @@ -3,7 +3,7 @@ const fs = require('fs'); module.exports = { readFileToBuffer: function (path) { - return new Buffer(fs.readFileSync(path)); + return Buffer.from(fs.readFileSync(path)); }, extractProjectJson: function (path) { const zip = new AdmZip(path); diff --git a/test/integration/offline-custom-assets.js b/test/integration/offline-custom-assets.js index c67deb852..8e8ed59e2 100644 --- a/test/integration/offline-custom-assets.js +++ b/test/integration/offline-custom-assets.js @@ -13,7 +13,7 @@ const VirtualMachine = require('../../src/index'); const projectUri = path.resolve(__dirname, '../fixtures/offline-custom-assets.sb2'); const projectZip = AdmZip(projectUri); -const project = new Buffer(fs.readFileSync(projectUri)); +const project = Buffer.from(fs.readFileSync(projectUri)); // Custom costume from sb2 file (which was downloaded from offline editor) // This sound should not be available on our servers const costume = projectZip.readFile('1.svg');