REditorSupport / REditorSupport/vscode-R

Add support for `test_active_file`

Open
#1,474 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Problem
A convenient way for continuous testing (in RStudio) is to only run devtools::test_active_file() to test only the active test-file.

This is especially beneficial, if the project is large and a blunt testthat::test() takes too much time. Currently, devtools::test_active_file() gives

r$> devtools::test_active_file()
Error in rstudioapi::executeCommand("activateConsole", quiet = TRUE) : 
  This {rstudioapi} function is not currently implemented for VSCode.

Solution
I assume you folks do not have much time, but I am happy to work on this, if:

  • it is possible with moderate difficulty
  • give me some hints on where to start e.g. other similar commands already ported from the {rstudioapi} so I can take their implementation as a blueprint

The project here is new to me, but if you give me some guidance on where to start a possible PR I'd happy to dive in!

Cheers and thanks for this extension, it's a gem !

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.

Research direction

Start by tracing devtools::test_active_file() and the existing rstudioapi::executeCommand("activateConsole") integration in VSCode-R; compare similar commands already ported from rstudioapi. Done means the active test file can be run in VSCode without the unsupported-function error, while preserving the intended continuous-testing workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.