posit-dev / posit-dev/positron

Use `match.call()` when parsing test files and finding the test identifier (`desc`)

Open
#2,633 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.