🔧 Spec: Don’t use deprecated new Buffer()
This commit is contained in:
parent
f7d6e3fa7b
commit
0278e380de
6 changed files with 16 additions and 16 deletions
|
@ -27,7 +27,7 @@ describe('BrowserWindow module', () => {
|
|||
postData = [
|
||||
{
|
||||
type: 'rawData',
|
||||
bytes: new Buffer('username=test&file=')
|
||||
bytes: Buffer.from('username=test&file=')
|
||||
},
|
||||
{
|
||||
type: 'file',
|
||||
|
@ -270,7 +270,7 @@ describe('BrowserWindow module', () => {
|
|||
assert.equal(isMainFrame, true)
|
||||
done()
|
||||
})
|
||||
const data = new Buffer(2 * 1024 * 1024).toString('base64')
|
||||
const data = Buffer.alloc(2 * 1024 * 1024).toString('base64')
|
||||
w.loadURL(`data:image/png;base64,${data}`)
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue