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

Show the filename and line number for each failed test #443

Merged
merged 12 commits into from
May 30, 2021

Conversation

Sija
Copy link
Member

@Sija Sija commented May 27, 2021

Resolves #441

image

or see the example of the failed run.

Sija added 2 commits May 27, 2021 15:02
…perty

Enhance compilers for `Ast::Suite` and `Ast::Test` to include `location` property in the compiled JS code
@Sija Sija added enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder) labels May 27, 2021
@Sija Sija self-assigned this May 27, 2021
@Sija Sija marked this pull request as ready for review May 27, 2021 13:54
@Sija Sija requested a review from gdotdesign May 27, 2021 13:54
@@ -71,7 +71,7 @@ module Mint
node1.input.input[start_position, count].includes?('\n')
end

def merge(ast)
def merge(ast) : self
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know this was a thing :D

@gdotdesign
Copy link
Member

LGTM!

The only thing is weird for me that the location is displayed at the end of the test, rspec for example shows the failures without the location and after that a failed examples group with the locations which I like more, but it's not a deal breaker for me.

rspec failures

@Sija
Copy link
Member Author

Sija commented May 30, 2021

Well, I do see the location there (on the screenshot), twice 🤔 Difference in the output is only the last "Failed examples" section, which is missing in mint right now.

@Sija
Copy link
Member Author

Sija commented May 30, 2021

I'm gonna merge this PR as it is, and if needed we can do a followup changing the output to the desired state.

@Sija Sija merged commit 7c005ec into master May 30, 2021
@Sija Sija deleted the feature/node-location branch May 30, 2021 13:08
@Sija Sija mentioned this pull request May 29, 2021
@gdotdesign gdotdesign added this to the 0.13.0 milestone May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder)
Development

Successfully merging this pull request may close these issues.

Display the filename and the source line of the failed test
2 participants