Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fbjs will throw (evaluating 'self.fetch.bind(self)' in capybara. #82

Closed
geminiyellow opened this issue Nov 16, 2015 · 3 comments
Closed

Comments

@geminiyellow
Copy link

i use capybara as my test framework,
but when i send a fetch in phantomJS,
i got:

TypeError: 'undefined' is not a function (evaluating 'self.fetch.bind(self)')
      TypeError: 'undefined' is not a function (evaluating 'self.fetch.bind(self)')
          at http://127.0.0.1:8888/assets/application-bs2.js:40940
          at http://127.0.0.1:8888/assets/application-bs2.js:38711 in __webpack_require__
          at http://127.0.0.1:8888/assets/application-bs2.js:39822
          at http://127.0.0.1:8888/assets/application-bs2.js:38711 in __webpack_require__
          at http://127.0.0.1:8888/assets/application-bs2.js:39051
          at http://127.0.0.1:8888/assets/application-bs2.js:38711 in __webpack_require__
          at http://127.0.0.1:8888/assets/application-bs2.js:38914
          at http://127.0.0.1:8888/assets/application-bs2.js:38971
          at http://127.0.0.1:8888/assets/application-bs2.js:38711 in __webpack_require__
          at http://127.0.0.1:8888/assets/application-bs2.js:38738
          at http://127.0.0.1:8888/assets/application-bs2.js:38711 in __webpack_require__
          at http://127.0.0.1:8888/assets/application-bs2.js:38731
          at http://127.0.0.1:8888/assets/application-bs2.js:46590 (Capybara::Poltergeist::JavascriptError)

and anybody can tell me what should i change ?

@sophiebits
Copy link
Contributor

Maybe do global.self = global;.

@geminiyellow
Copy link
Author

@spicyj oh... in where?

@geminiyellow
Copy link
Author

OK, done. i need use whatwg-fetch with webpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants