From 6e1bc689c5cb1816e3afd87b1efbd183b2e0fda2 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Mon, 7 Jan 2019 21:15:16 +0100 Subject: [PATCH] Use Buffer.from (#2512) --- .../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 }); });