Skip to content

Commit be24290

Browse files
committed
Small fixes to test
1 parent fe130c6 commit be24290

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

R/ggplotly.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ geom2trace <-
170170
list(x=data$x,
171171
y=data$y,
172172
name=params$name,
173-
text=data$text,
174173
type="bar")
175174
}
176175
)

inst/tests/test-ggplot-bar.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ test_that("position_dodge is translated to barmode=group", {
1818
})
1919

2020
test_that("position_stack is translated to barmode=stack", {
21-
gg.stack <- gg+geom_bar(stat="identity", position="stack")
22-
gg2list(gg.stack)
21+
gg.stack <- gg + geom_bar(stat="identity", position="stack")
22+
L <- gg2list(gg.stack)
2323
expect_equal(length(L), 3)
2424
trace.names <- sapply(L[1:2], "[[", "name")
2525
expect_true(all(c("Math", "Bio") %in% trace.names))
2626
expect_identical(L$kwargs$layout$barmode, "stack")
2727
})
2828

2929
test_that("position_identity is translated to barmode=overlay", {
30-
gg.identity <- gg+geom_bar(stat="identity", position="identity")
31-
gg2list(gg.identity)
30+
gg.identity <- gg + geom_bar(stat="identity", position="identity")
31+
L <- gg2list(gg.identity)
3232
expect_equal(length(L), 3)
3333
trace.names <- sapply(L[1:2], "[[", "name")
3434
expect_true(all(c("Math", "Bio") %in% trace.names))

0 commit comments

Comments
 (0)