Replace new Buffer() with Buffer.from()

This removes the deprecation warnings logged when tests are run.
This commit is contained in:
adroitwhiz 2021-03-07 16:21:06 -05:00
parent 32f87b3396
commit 3c9f7557f5
2 changed files with 2 additions and 2 deletions
test/integration

View file

@ -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');