Skip to content

Commit 6cf0148

Browse files
committed
update test-utils-palette.R
1 parent a3f4c71 commit 6cf0148

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/testthat/test-utils-palette.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ testthat::test_that("colour palette is completed if it misses colours for gradin
44
sample_data <- data.frame(GRADING = LETTERS[1:n])
55
grading_col_pal <- structure(sample(colours(), n - 10), names = LETTERS[1:(n - 10)])
66
grading_col_pal_filled <- fill_palette(sample_data[["GRADING"]], grading_col_pal)
7-
testthat::expect_length(grading_col_pal_filled, n)
7+
testthat::expect_length(grading_col_pal_filled, n + length(CONST$default_palette))
88
})
99

1010
testthat::test_that("colour palette is filled even if pre-defined colors used up", {
@@ -21,5 +21,5 @@ testthat::test_that("colour palette is filled even if pre-defined colors used up
2121
names = LETTERS[1:26]
2222
)
2323
grading_col_pal_filled <- fill_palette(sample_data[["GRADING"]], grading_col_pal)
24-
testthat::expect_length(grading_col_pal_filled, 29)
24+
testthat::expect_length(grading_col_pal_filled, 29 + length(CONST$default_palette))
2525
})

0 commit comments

Comments
 (0)