-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R: make outline and breadcrumbs work for tests and test files #1428
Comments
@juliasilge I nominate this one for inclusion in the package dev epic issue. What do you think? |
Yes, makes sense @jennybc! |
The outline is generated from "document symbols", which in this case come from ark. We'll need to add testthat statements as document symbols to get them to show up in the outline. From my experimenting so far, as of right now, something has to be assigned to be a document symbol that gets added to the outline, like: ## this does get added to the outline
x <- 1
## or
y = 2
## or
z <- function(i) {
i + 1
}
## this does not get added to the outline
for (i in 1:3) {
print(i)
} Alternatively, we could add an additional document symbol provider in the R extension (not ark) and write out rules for testthat document symbols in Typescript. The docs for
So if for some reason it's not appropriate to add this to ark, we could do this. |
I chatted with some other R folks today, and we want to focus on UI for testing in #1365 and not prioritize getting test files to show up with good content in the outline for now. We'll leave this open but I am taking it out of the R package development epic. |
I'm adding some recent feedback from @hadley here, because it's super related. But when someone actually works on this, it's possible these become two separate issues.
|
Our current outline doesn't know how to help with test files.
I'm seeing "No symbols found in document 'test-multi-file.R'".
The text was updated successfully, but these errors were encountered: