mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-22 22:12:28 -05:00
Merge pull request #2936 from adroitwhiz/remove-new-buffer
Replace `new Buffer()` with `Buffer.from()`
This commit is contained in:
commit
2d6cce5f7f
2 changed files with 2 additions and 2 deletions
2
test/fixtures/readProjectFile.js
vendored
2
test/fixtures/readProjectFile.js
vendored
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue