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
In package projects, for test files under tests/testthat, it might be nice if the document outline / table of contents treated the test_that() call as headers, so one could easily navigate from one test to the other, or see at a glance all the test names in a test file.
E.g.
test_that("bla() works", {})
test_that("bla() errors well", {})
test_that("bla() when blop not installed", {})
would generate an outline to go directly to "bla() works"/"bla() errors well"/"bla() when blop not installed".
Activity
kevinushey commentedon Apr 28, 2022
FYI for @romainfrancois: you probably want to start looking around in
rstudio/src/gwt/acesupport/acemode/r_code_model.js
Line 736 in 4ccbd3e
romainfrancois commentedon Apr 28, 2022
Not exactly this request, but perhaps
test_that()calls can be source items so that e.g. fuzzy finder recognizes them.romainfrancois commentedon May 7, 2022
QA: in a package that has unit tests, the outline should show them:
Also, the fuzzy finder indexes them if the search term starts with "t ":
jgutman commentedon May 9, 2022
Verified in 2022.6.0.374 RStudio Desktop running on Mac OS 12.3.1
jgutman commentedon May 9, 2022
Great feature! Thanks for the suggestion.
maelle commentedon May 9, 2022
Thanks @romainfrancois @kevinushey @jgutman 🎉