Skip to content

global.should = require("chai").should() doesn't work #86

@domenic

Description

@domenic

Not sure why this is or what to do about it, so I wanted to record it so we can look into it later.

Basically, in my Mocha fixture I tried to do

global.should = require("chai").should();

But then when I tried to run

should.not.exist(undefined);

I got a big error saying that "{ ... all the properties of the global object ... } should not exist". So it seemed to be picking up Object.prototype.should instead of global.should, which was surprising.

This was under Node 0.8 with Chai 1.1.1, Mocha 1.3.0.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions