vitest
vitest copied to clipboard
Any plan for documentation test like rust?
Clear and concise description of the problem
As a developer using Vitest I wish an exciting feature - "documentation comments test" like rust.
Nothing is better than documentation with examples. But nothing is worse than examples that don't work because the code has changed since the documentation was written.
https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#documentation-comments-as-tests
Suggested solution
when we run Vitest, it will run the tests in documentation comments.
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.