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

Add message to better understand log message in tests #255

Merged
merged 1 commit into from
Jun 11, 2018

Conversation

trotzig
Copy link
Collaborator

@trotzig trotzig commented Jun 10, 2018

We have a test that verifies that an error is thrown as part of
rendering a waypoint with more than one child. Even though we take
measures to prevent the error from leaking outside the test itself,
Karma picks it up and prints a confusing log:

ERROR: 'The above error occurred in the component:
in Waypoint
in div

No error is logged above that line, which makes it hard to understand.

While it's probably possible to get rid of that line some other way, I
opted for a simple solution to begin with, simply logging something that
makes it A) easier to ignore B) easier to find the offending test case.

We have a test that verifies that an error is thrown as part of
rendering a waypoint with more than one child. Even though we take
measures to prevent the error from leaking outside the test itself,
Karma picks it up and prints a confusing log:

ERROR: 'The above error occurred in the <Waypoint> component:
    in Waypoint
    in div

No error is logged above that line, which makes it hard to understand.

While it's probably possible to get rid of that line some other way, I
opted for a simple solution to begin with, simply logging something that
makes it A) easier to ignore B) easier to find the offending test case.
@trotzig
Copy link
Collaborator Author

trotzig commented Jun 10, 2018

@MatthewHerbst Can you add me to the list of owners for this repo? And/or merge this PR? :)

@trotzig trotzig merged commit d59f084 into civiccc:master Jun 11, 2018
@trotzig trotzig deleted the explain-error-in-test branch June 11, 2018 04:36
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