From ca537c0711b29ee4120041508bdcf8e9fda71e6d Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Sat, 5 Jan 2019 12:45:10 +0100 Subject: [PATCH] Use Buffer.from --- .../core/integration-tests/test/integration/globals/index.js | 2 +- packages/core/integration-tests/test/javascript.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/integration-tests/test/integration/globals/index.js b/packages/core/integration-tests/test/integration/globals/index.js index fa6f5ff1411..d036bcb5735 100644 --- a/packages/core/integration-tests/test/integration/globals/index.js +++ b/packages/core/integration-tests/test/integration/globals/index.js @@ -2,7 +2,7 @@ module.exports = function () { return { dir: __dirname, file: __filename, - buf: new Buffer(process.title).toString('base64'), + buf: Buffer.from(process.title).toString('base64'), global: !!global.document }; }; diff --git a/packages/core/integration-tests/test/javascript.js b/packages/core/integration-tests/test/javascript.js index a0474f8212e..ba255be5792 100644 --- a/packages/core/integration-tests/test/javascript.js +++ b/packages/core/integration-tests/test/javascript.js @@ -802,7 +802,7 @@ describe('javascript', function() { assert.deepEqual(output(), { dir: path.join(__dirname, '/integration/globals'), file: path.join(__dirname, '/integration/globals/index.js'), - buf: new Buffer('browser').toString('base64'), + buf: Buffer.from('browser').toString('base64'), global: true }); });