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

magrittr dependency in tests #203

Closed
crew102 opened this issue Sep 12, 2018 · 0 comments
Closed

magrittr dependency in tests #203

crew102 opened this issue Sep 12, 2018 · 0 comments

Comments

@crew102
Copy link

crew102 commented Sep 12, 2018

Perhaps we should come up with a reprex that doesn't require magrittr for this test (so that we can remove a dep on magrittr when running tests):

test_that("reprex_invert(venue = 'gh') doesn't strip leading ws", {
skip_on_cran()
temporarily()
input <- c(
"library(magrittr)",
"mtcars[, 1:2] %>%",
" head(n = 1)"
)
reprexed <- reprex(
input = input, venue = "gh", advertise = FALSE, show = FALSE
)
inverted <- reprex_invert(reprexed, venue = "gh")
expect_match(inverted, input[3], all = FALSE, fixed = TRUE)
})

If you think we to keep the reprex as is (i.e., b/c it provides a realistic example of where leading whitespace would be used), I'd suggest adding skip_if_not_installed("magrittr") to the above test, as well as adding magrittr to Suggests.

Happy to issue a PR for this.

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

No branches or pull requests

1 participant