2016-09-08 17:34:09 +00:00
|
|
|
const path = require('path')
|
2018-09-13 16:10:51 +00:00
|
|
|
const { remote } = require('electron')
|
|
|
|
const { Buffer } = window
|
2016-09-08 17:34:09 +00:00
|
|
|
|
|
|
|
delete window.Buffer
|
|
|
|
delete global.Buffer
|
|
|
|
|
|
|
|
// Test that remote.js doesn't use Buffer global
|
2018-09-13 16:10:51 +00:00
|
|
|
remote.require(path.join(__dirname, 'print_name.js')).echo(Buffer.from('bar'))
|
2016-09-08 17:34:09 +00:00
|
|
|
|
2018-09-13 16:10:51 +00:00
|
|
|
window.test = Buffer.from('buffer')
|