posit-dev / posit-dev/positron
Use `match.call()` when parsing test files and finding the test identifier (`desc`)
Open
@jennybc is already working on this.
Since Apr 10, 2024.
enhancement
lang: r
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
The current test file parsing anticipates straightforward usage of test_that("this thing works", { ... }). We're looking for desc as that first string argument. This covers a vast amount of testthat usage and, I'm willing to say, this covers recommended testthat usage.
However, people do get more creative and we might be able to handle a subset of these more exotic uses if we processed the test_that() call with match.call(), to resolve desc.
This would benefit from more feedback from real-world use.
This was extracted from #1808.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.