Add `self` to test browser helper
Most browsers have `self` as the `window` object, our test browser doesn't have the `self` variable, recent update in form-data form-data/form-data@f64a4c3 switched to use `self`, this fix adds `self` reference back so it is aligned with browser behavior
This commit is contained in:
parent
6491cc8e71
commit
7e5569cf70
|
@ -7,6 +7,7 @@ var vm = require('vm');
|
|||
|
||||
function createContext() {
|
||||
var context = {
|
||||
self: context,
|
||||
// required by browserify
|
||||
XMLHttpRequest: function() { throw new Error('not implemented'); },
|
||||
FormData: function() { throw new Error('not implemented'); },
|
||||
|
|
Loading…
Reference in New Issue