Skip to content

Commit eab46d3

Browse files
committed
fix: update test expectation
1 parent 2e51828 commit eab46d3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎tests/testthat/test-ggplot-legend.R‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
expect_traces <- function(gg, n.traces, name){
43
stopifnot(is.numeric(n.traces))
54
L <- expect_doppelganger_built(gg, paste0("legend-", name))
@@ -29,8 +28,8 @@ test_that("Discrete colour and shape get merged into one legend", {
2928
nms, paste0("(", d$vs, ",", d$cyl, ")")
3029
)
3130
legend_title <- info$layout$legend$title$text
32-
expect_match(legend_title, "^factor\\(vs\\)")
33-
expect_match(legend_title, "factor\\(cyl\\)$")
31+
expect_match(legend_title, "factor(vs)", fixed = TRUE)
32+
expect_match(legend_title, "factor(cyl)", fixed = TRUE)
3433
})
3534

3635

0 commit comments

Comments
 (0)