You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!("actual" in opts)) opts.actual = this.actual
if (!("caller" in opts)) opts.caller = assert.caller
var msg = stringify(this.actual) + " must " + (this.negative ? "not " : "")
That this.actual is stringified, though could that be stringify(opts.actual) instead? As this.actual is assigned to opts.actual a couple of lines above anyway if it doesn't already exist.
This would help me pass a more pleasant looking actual for the assertion error message, which I'm doing over at must-jsx.
The text was updated successfully, but these errors were encountered:
Hey! Sure, customizing what gets stringified makes sense. I see there's Must.prototype.throw that uses the actual parameter for assigning to the error object but still expecting the original actual (the function that threw an exception) to be stringified. Once I figure out how these two cases can co-exist, I'll make the change ;)
Hey @moll! I noticed in the
assert
function here:That
this.actual
is stringified, though could that bestringify(opts.actual)
instead? Asthis.actual
is assigned toopts.actual
a couple of lines above anyway if it doesn't already exist.This would help me pass a more pleasant looking
actual
for the assertion error message, which I'm doing over atmust-jsx
.The text was updated successfully, but these errors were encountered: