Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display error location and diff only if in diag #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Display error location and diff only if in diag #1

wants to merge 1 commit into from

Conversation

ArnaudRinquin
Copy link

This change makes it so the error location and diff are shown only if the diagnostic has them.

This prevents outputs like the following when used with test frameworks which don't produce such diagnostic:

    Example
      ✖this fails
        at undefined

        actual expected

        undefined

It will instead just print:

    Example
      ✖this fails

This change makes it so the error location and diff are shown only if the diagnostic has them.

This prevents outputs like the following when used with test frameworks which don't produce such diagnostic: 

```
    Unit tests
      ✖ → test runner
        at undefined

        actual expected

        undefined
```
@scottcorgan
Copy link
Member

👍 I've been meaning to do this. I'll merge when I get back to my computer!

@ArnaudRinquin
Copy link
Author

Cool! I hope you'll get back to your computer soon ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants