Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Jan 10, 2021
1 parent ff9455d commit 6624000
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/transform-files.R
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ parse_transform_serialize_r <- function(text,
transformers_subset_impl <- function(transformers, token, scope, code) {
transformer_names <- names(token)
for (i in seq_along(token)) {
if (!any(token[i] %in% code)) {
if (!any(token[[i]] %in% code)) {
transformers[[scope]][[transformer_names[i]]] <- NULL
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-transformers-subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test_that("if no subset_transformers is specified, no transformer is removed and

test_that('semi-colon is parsed without error', {
expect_equal(
transformers_subset(c("a", ";", "b"), t_fun),
t_fun
transformers_subset(c("!a", ";", "b"), t),
t
)
})

0 comments on commit 6624000

Please sign in to comment.