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:
David Cheung 2016-10-28 16:54:22 -04:00
parent 6491cc8e71
commit 7e5569cf70
1 changed files with 1 additions and 0 deletions

View File

@ -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'); },