Mainly for posting issues.
JSON.stringify() almost works, but we prefer not to use it on plain strings.
Using .valueOf() and checking if we get a string almost works, but fails with null and undefined.
So, enough corner cases where we something with good testing.
Or maybe we get lucky and there a JS API being missed.
It seems like the repr work done in xunit actually seems like the best thing.
So, factor that out into a shared class that both base and xunit can use.
Might as well include the equality stuff as well, both for testing (with details) and plain true/false.
Mainly for posting issues.
JSON.stringify()almost works, but we prefer not to use it on plain strings.Using
.valueOf()and checking if we get a string almost works, but fails withnullandundefined.So, enough corner cases where we something with good testing.
Or maybe we get lucky and there a JS API being missed.
It seems like the
reprwork done in xunit actually seems like the best thing.So, factor that out into a shared class that both base and xunit can use.
Might as well include the equality stuff as well, both for testing (with details) and plain true/false.