Skip to content

xunit: Expose robust stringfying #344

@nexushoratio

Description

@nexushoratio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions