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

Cannot read property 'prototype' of undefined #3

Closed
GeoffreyPlitt opened this issue Sep 12, 2016 · 4 comments
Closed

Cannot read property 'prototype' of undefined #3

GeoffreyPlitt opened this issue Sep 12, 2016 · 4 comments

Comments

@GeoffreyPlitt
Copy link

When I run any mocha tests on files that include your module, they fail:

mocha src/*/.spec.js

/Users/giro/stardust-app/node_modules/react-native-socket.io-client/socket.io.js:6381
var objectProto = Object.prototype,
^
TypeError: Cannot read property 'prototype' of undefined

@hilkeheremans
Copy link
Contributor

Please run npm run test instead, just as in the original socket.io-client...

Let me know if that works for you.

@GeoffreyPlitt
Copy link
Author

Well, I'm testing my own code, not running your tests. But simply importing your code breaks my test runner (Mocha/Istanbul), because of the fake "Object" thing that's going on near that line of code, does that make sense?

@hilkeheremans
Copy link
Contributor

Related to socketio/socket.io#2381, please check there.

@GeoffreyPlitt
Copy link
Author

Thanks!

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