Skip to content

Commit

Permalink
move tests to teal.code
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Oct 30, 2024
1 parent 5839f0d commit 269b77b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/testthat/test-extract.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
testthat::test_that("`[.` returns empty teal_data for names not in teal_data", {
data <- teal_data(x = 1, a = 2)
testthat::expect_warning(
testthat::expect_equal(data["y"], teal_data()),
"None of `names` elements exist in `teal_data`. Returning empty `teal_data`."
)
})

testthat::test_that("`[.` returns limited teal_data for some names not in teal_data", {
data <- teal_data(x = 1, a = 2)
testthat::expect_warning(
testthat::expect_equal(data[c("y", "a")], data["a"]),
"Some elements of `names` do not exist in `teal_data`. Skipping those: y."
)
})

testthat::test_that("`[.` handles empty names", {
data <- teal_data(x = 1, a = 2)
Expand Down

0 comments on commit 269b77b

Please sign in to comment.