Skip to content

Commit

Permalink
test: add test for console warning on reserved names
Browse files Browse the repository at this point in the history
  • Loading branch information
averissimo committed Nov 15, 2024
1 parent c49b628 commit 073f3b9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/testthat/test-init.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ testthat::test_that(
}
)

testthat::test_that(
"init throws warning when datanames in modules has reserved name",
{
testthat::expect_warning(
init(
data = teal.data::teal_data(all = mtcars),
modules = list(example_module())
),
"`all` is reserved for internal use\\. Please avoid using it as a dataset name\\."
)
}
)

testthat::test_that("init throws when dataname in filter incompatible w/ datanames in data", {
testthat::expect_warning(
init(
Expand Down

0 comments on commit 073f3b9

Please sign in to comment.