Skip to content

Commit 1efff6f

Browse files
committed
test: fix tests for top() when default order to "-.n"
1 parent ba61db1 commit 1efff6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testthat/test-clone_selectors_top.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ test_that("top() works with dplyr::mutate()", {
4848
group = c(rep("A", 10), rep("B", 50))
4949
)
5050
result <- dplyr::mutate(df, TopClones = top(1))
51-
expect_equal(result$TopClone, c(rep("A", 10), rep(NA, 50)))
51+
expect_equal(result$TopClone, c(rep(NA, 30), rep("C", 30)))
5252

5353
result <- dplyr::mutate(df, TopClones = top(1, groups = "group"))
54-
expect_equal(result$TopClones, c(rep("A", 10), rep("B", 20), rep(NA, 30)))
54+
expect_equal(result$TopClones, c(rep("A", 10), rep(NA, 20), rep("C", 30)))
5555
})
5656

5757
test_that("top() works with given environment", {

0 commit comments

Comments
 (0)