Support for test_active_file in vscode
I'm moving away from rstudio towards vscode. Unfortunately, function like test_active_file still doesn't work on vscode. I guess it is because it relies on rstudioapi to detect what file is active.
This is the error message if i try to run test_active_file:
Error in rstudioapi::executeCommand("activateConsole", quiet = TRUE) :
This {rstudioapi} function is not currently implemented for VSCode.
The alternative is to use test_file, but even then the error persist. Plus, it was already deprecated post 2.4.0.
Happy to consider alternative way of running a test on just a single file that does not rely on rstudio.
The testing situation in Positron is quite nice. If you haven't heard of Positron here is more info:
https://positron.posit.co/
In the R Console of Positron, test_active_file() "just works" and there is also a new test explorer, which provides another way to run the tests in a single file (or to run a single test).