Skip to content
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

RStudio IDE "Run Tests" with failed expectation generates IDE error #295

Closed
trestletech opened this issue Nov 4, 2019 · 2 comments
Closed

RStudio IDE "Run Tests" with failed expectation generates IDE error #295

trestletech opened this issue Nov 4, 2019 · 2 comments

Comments

@trestletech
Copy link
Contributor

@trestletech trestletech commented Nov 4, 2019

In the RStudio IDE:

  • Start with a Shiny app that has no tests/ dir
  • Record a shinytest via shinytests::recordTest()
  • It will bring up the test script at the end. Go into the expected directory and change some value so that the expectations are now wrong (or change the app source)
  • click "Run Tests" in the script that was opened.

Screen Shot 2019-11-04 at 3 05 04 PM

Observe this error.

I think this is where the IDE is going wrong. Appending tests/ to the app path and looking in there. As noted in #293, the IDE is already pointing to the wrong appdir path; now appending another invalid path to that one.

From the IDE diagnostics, we're getting that butchered path which didn't go up far enough (i.e. the appdir is ___/tests/) and now we're assuming that the terminal dir is inevitably called tests which gets appended. Thus we're looking for app/tests/tests/mytest.R which, of course, doesn't exist.

Screen Shot 2019-11-04 at 3 31 18 PM

@trestletech
Copy link
Contributor Author

@trestletech trestletech commented Nov 5, 2019

Jonathan pointed out that we could add a check into the shinytest package that checks the version of the IDE and presents a warning if it thinks there are going to be issues.

@hadley
Copy link
Member

@hadley hadley commented Aug 7, 2020

Given the overall development resources available to shinytest and the fact that this will naturally resolve itself as people upgrade the ide, I think it's best just to close this issue.

@hadley hadley closed this Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.