Skip to content

Commit c37f789

Browse files
committed
add visual tests
1 parent db4a5f3 commit c37f789

File tree

3 files changed

+133
-0
lines changed

3 files changed

+133
-0
lines changed
Lines changed: 61 additions & 0 deletions
Loading
Lines changed: 61 additions & 0 deletions
Loading

tests/testthat/test-geom-curve.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
test_that("geom_curve flipping works", {
2+
3+
df <- data.frame(x = c(1, 2), xend = c(2, 3), y = 1, yend = c(2, 1.5))
4+
5+
p <- ggplot(df, aes(x, y, xend = xend, yend = yend)) +
6+
geom_curve(arrow = arrow())
7+
8+
expect_doppelganger("standard geom_curve", p)
9+
expect_doppelganger("flipped geom_curve", p + scale_y_reverse())
10+
11+
})

0 commit comments

Comments
 (0)