🔧 Spec: Don’t use deprecated new Buffer()

This commit is contained in:
Felix Rieseberg 2017-11-23 14:22:31 -08:00
parent f7d6e3fa7b
commit 0278e380de
6 changed files with 16 additions and 16 deletions

View file

@ -145,7 +145,7 @@ describe('ipc module', () => {
describe('remote.createFunctionWithReturnValue', () => {
it('should be called in browser synchronously', () => {
const buf = new Buffer('test')
const buf = Buffer.from('test')
const call = remote.require(path.join(fixtures, 'module', 'call.js'))
const result = call.call(remote.createFunctionWithReturnValue(buf))
assert.equal(result.constructor.name, 'Buffer')
@ -239,7 +239,7 @@ describe('ipc module', () => {
const printName = remote.require(print)
it('keeps its constructor name for objects', () => {
const buf = new Buffer('test')
const buf = Buffer.from('test')
assert.equal(printName.print(buf), 'Buffer')
})