electron/spec/fixtures/module/delete-buffer.js
2018-09-14 14:57:01 +10:00

11 lines
303 B
JavaScript

const path = require('path')
const { remote } = require('electron')
const { Buffer } = window
delete window.Buffer
delete global.Buffer
// Test that remote.js doesn't use Buffer global
remote.require(path.join(__dirname, 'print_name.js')).echo(Buffer.from('bar'))
window.test = Buffer.from('buffer')