delete-buffer.js 297 B

123456789101112
  1. const path = require('path')
  2. const {remote} = require('electron')
  3. const {Buffer} = window
  4. delete window.Buffer
  5. delete global.Buffer
  6. // Test that remote.js doesn't use Buffer global
  7. remote.require(path.join(__dirname, 'print_name.js')).echo(new Buffer('bar'))
  8. window.test = new Buffer('buffer')