Skip to content

improve output on invalid JSON in an example #28

@bpytlik

Description

@bpytlik

When an example isn't valid JSON, the error you get looks like this:
AssertionError: Invalid JSON:
undefined
Error: expected [Function] to not throw an error but 'SyntaxError: Unexpected string' was thrown

Followed by a stack trace. It would be nice if:
a) the error identified that it was the example and not the json schema that was invalid.
b) the error provided more information about what was invalid, perhaps via something like json-lint

This seems in the same vein as issue #19.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions