-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The html reporter allows viewing the current use case code #5931
Comments
Is it html reporter or dynamic Vitest UI? There is usually a |
I don't really see any reason to add a separate tab to show just a small part of the code when we already show full code. The #5948 PR adds a way to scroll to the test line, - it should be enough to close this issue. |
reason:
I'm not sure if that PR has the ability to view the code for the current use case (rather than the code for the entire file) in the html report. There are more reasons to allow viewing of only the current use case, for example:
These features clearly demonstrate the usefulness of allowing navigation to a certain content. |
Clear and concise description of the problem
I hope that when I click on a use case, I can view the test code of the use case. It can bring the following benefits:
Suggested solution
Suppose there is a use case
a
. When you click on the use casea
, there is a parameter in the url, such as?it=a
, which is used to mark the current use case. And you can view its corresponding code on the right.I can paste the url link to other places, such as the usage document. When others click on this url, they can view the relevant information of the corresponding use case.
Even simply displaying the toString result of the test case function (ignoring other functions referenced within the function) is sufficient for participating in the example.
Alternative
No response
Additional context
Its functionality is similar to mochawesome.
Test case code:
UI test results:
Validations
The text was updated successfully, but these errors were encountered: