An alternative way of writing an autoload-function. From my personal experience it works and returns the proper boolean values.
Feedback is welcome!
var origExpect = global.expect; | |
global.expect = function (subject) { | |
if (arguments.length > 1) { | |
throw new Error('You passed more than one argument to jest expect.'); | |
} | |
return origExpect(subject); | |
}; |