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

fix(cli/coverage): invalid line id in html reporter #23908

Merged
merged 2 commits into from
May 21, 2024

Conversation

lowlighter
Copy link
Contributor

The name for the anchors are prefixed with a L, but the links are currently missing it so they don't work currently:
image

@bartlomieju bartlomieju requested a review from kt3k May 20, 2024 23:14
@bartlomieju
Copy link
Member

Thanks, any chance you could update the existing HTML reporter test to exercise this change?

@lowlighter
Copy link
Contributor Author

@bartlomieju I can, however I'm not sure where it is located. Is it supposed to be somewhere in the same rust file or is it like in another test folder ?

@bartlomieju
Copy link
Member

@lowlighter there is a test_html_reporter test in tests/integration/coverage_tests.rs that I think you could update.

@kt3k
Copy link
Member

kt3k commented May 21, 2024

The change looks good to me.

@lowlighter
The test case executes something like the below:

deno test --quiet --coverage=cov_file tests/testdata/coverage/multisource/
deno coverage cov_file --html

and asserts specific part of output html files. Maybe let's assert foo.ts.html has <a name='L1'></a><a href='#L1'>1</a>?

Nevermind. You've already done it.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM too. Thanks!

@bartlomieju bartlomieju merged commit fa5c61e into denoland:main May 21, 2024
17 checks passed
@lowlighter lowlighter deleted the fix-line-id-coverage branch May 28, 2024 16:07
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.

None yet

3 participants