Closed Nicolab closed 10 years ago
Hey!
That's funny, but it indeed turns out an instance of Error
has no enumerable properties which Must.prototype.empty
looks for to decide on emptiness. It would be nice if message
were enumerable, but I guess it's because message
in the Error
's prototype (Error.prototype.message
) is also set non-enumerable.
You can see it like this:
Object.getOwnPropertyDescriptor(Error.prototype, "message")
{ value: '',
writable: true,
enumerable: false,
configurable: true }
Hello,
It should fail ?