Closed
Description
I'm using Istanbul to run code coverage (and tests) on some code. We use socket.io-client in our codebase.
The tests are failing with the following problem, caused by some weird "Convenience aliases" in the socket.io-client codebase around line 5235. Here's the code around socket.io.js:5235:
// Native constructor aliases.
var Number = context["Number"] || root["Number"],
String = context["String"] || root["String"],
Object = context["Object"] || root["Object"],
Date = context["Date"] || root["Date"],
SyntaxError = context["SyntaxError"] || root["SyntaxError"],
TypeError = context["TypeError"] || root["TypeError"],
Math = context["Math"] || root["Math"],
nativeJSON = context["JSON"] || root["JSON"];
And here's the error I'm getting:
$ npm test
> mocha src/**/*.spec.js
/Users/giro/stardust-app/node_modules/socket.io-client/socket.io.js:5251
var objectProto = Object.prototype,
^
TypeError: Cannot read property 'prototype' of undefined
at runInContext (/Users/giro/stardust-app/node_modules/socket.io-client/socket.io.js:5251:29)
at Object.<anonymous> (/Users/giro/stardust-app/node_modules/socket.io-client/socket.io.js:6070:5)
at Object.<anonymous> (/Users/giro/stardust-app/node_modules/socket.io-client/socket.io.js:6103:4)
Please advise, thanks.
Metadata
Metadata
Assignees
Labels
No labels