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

Add module finding support for ‘testthat’ #188

Closed
klmr opened this issue Mar 14, 2021 · 0 comments · Fixed by #189
Closed

Add module finding support for ‘testthat’ #188

klmr opened this issue Mar 14, 2021 · 0 comments · Fixed by #189
Assignees

Comments

@klmr
Copy link
Owner

klmr commented Mar 14, 2021

The current testing workflow entails loading a submodule called __tests__ from the main module, and launching testthat::test_dir() from within it.

However, this means that although the test context sets the working directory to the tests directory, ‘box’ assumes the currently executing file is the parent module and it therefore searches for local modules in the parent directory rather than relative to the test case file.

Add support for being run inside ‘testthat’ to script_path().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant