Guy Korland Guy Korland - 8 months ago 42
Javascript Question

How to disable should.js override "should" property?

One of the external libraries we're using is having a property called "should" in one of its classes.

When we run tests with shouldjs it seems like should instruments its class with its "should" which crashes the library.

How can we hint shouldjs to avoid instrument this class?


Just to fill all posibilities.

You can require should.js via should/as-function and use it only as function, it will not try to extend Object.prototype in this case: