summaryrefslogtreecommitdiff
path: root/tests/testthat/test-heatmap.R
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testthat/test-heatmap.R')
-rw-r--r--tests/testthat/test-heatmap.R23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/testthat/test-heatmap.R b/tests/testthat/test-heatmap.R
new file mode 100644
index 0000000..24eae8d
--- /dev/null
+++ b/tests/testthat/test-heatmap.R
@@ -0,0 +1,23 @@
+test_that("returns a ggplot object", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x)
+ inherits(p, 'ggplot')
+})
+
+test_that("returns a ggplot object with labels", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x, labels = TRUE)
+ inherits(p, 'ggplot')
+})
+
+test_that("returns a ggplot object with labels and title", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x, title = 'test', labels = TRUE)
+ inherits(p, 'ggplot')
+})
+
+test_that("returns a ggplot object with title", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x, title = 'test')
+ inherits(p, 'ggplot')
+})