gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 786 forks source link

"Object" is undefined? #695

Closed GeoffreyPlitt closed 8 years ago

GeoffreyPlitt commented 8 years ago

I'm getting the strangest error when we run our test coverage. Node=6.5.0. Somehow "Object" is not defined?

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

The code runs fine normally, and this error only happens with Istanbul test/coverage. How could "Object" not be defined?

GeoffreyPlitt commented 8 years ago

Turns out to be a problem with socket.io-client aliasing those types.