js-must icon indicating copy to clipboard operation
js-must copied to clipboard

Must.prototype.assert's stringification of a Promise is non-informative

Open jandppw opened this issue 6 years ago • 0 comments

Must.prototyp.assert generates a message that reads '${stringify(this.actual)} must …'.

When the actual is a Promise, this produces the less informative representation '{}'.

To add insult to injury, in Node 0.10, it produces something like '{"_40": 2, "_70": null …}'. These 'numeric' properties are presumably some sort of Promise administration in Node 0.10.

What would be a good way to represent a Promise as actual?

jandppw avatar Dec 11 '17 19:12 jandppw