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
ospecs messaging processes assertion values differently depending on environment. Under Node it uses util.inspect, the platforms preferred tool for debugging; but in the browser it falls back to a loosely opinionated custom process for stringifying values.
Browser consoles are much richer than Nodes' terminal output and could be better served by making use of string substitution, which allow intelligent representations of complex entities - see below for current vs suggested behaviour for exotic objects logged by ospec in Chrome
Happy to implement this myself.
The text was updated successfully, but these errors were encountered:
This would require keeping structured assertion results, rather than strigifying on the fly as we do now...
The results are exposed to custom reporters, and some people take advantage of this, so the custom stringification will have to be kept around until the next major version.
I agree ospec reporting data shouldn’t be contingent on output APIs but I feel it should be easy enough to change the shape of the records to store the assertion operands — the (re)substitution could then take place as a runtime operation in o.report.
pygy
transferred this issue from MithrilJS/mithril.js
Jan 18, 2021
ospecs messaging processes assertion values differently depending on environment. Under Node it uses util.inspect, the platforms preferred tool for debugging; but in the browser it falls back to a loosely opinionated custom process for stringifying values.
Browser consoles are much richer than Nodes' terminal output and could be better served by making use of string substitution, which allow intelligent representations of complex entities - see below for current vs suggested behaviour for exotic objects logged by ospec in Chrome
Happy to implement this myself.
The text was updated successfully, but these errors were encountered: