You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust's documentation comment test, aka doctest, is really good for guaranteeing documentation accuracy and improving code maintainabilities. And I suggest to introduce such features into vitest.
And when running vitest, it will test all code inside the documentation. In that case, the accuracy of the code example inside documentation comments will be guaranteed, and once reading the doc, people can easily understand how the function works, according to the example code rather than unnecessary descriptions written in natural languages (such as English).
Clear and concise description of the problem
Rust's documentation comment test, aka
doctest
, is really good for guaranteeing documentation accuracy and improving code maintainabilities. And I suggest to introduce such features intovitest
.Suggested solution
For example:
And when running vitest, it will test all code inside the documentation. In that case, the accuracy of the code example inside documentation comments will be guaranteed, and once reading the doc, people can easily understand how the function works, according to the example code rather than unnecessary descriptions written in natural languages (such as English).
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: