summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Sobczak <chris@sobczak.family>2026-07-06 14:34:31 -0700
committerChris Sobczak <chris@sobczak.family>2026-07-06 14:34:31 -0700
commite6f6a49b41a26b184cbdc7b3f532f3deef01031d (patch)
tree7b7d8cad34549a6ab8ac2fd1e9a5d287ee958c32 /tests
parentd26e218f30cc80235c170f85e368f7c361ebf1e4 (diff)
Fix factors
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test-heatmap.R23
-rw-r--r--tests/testthat/text-heatmap.R5
2 files changed, 23 insertions, 5 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')
+})
diff --git a/tests/testthat/text-heatmap.R b/tests/testthat/text-heatmap.R
deleted file mode 100644
index 94ea14e..0000000
--- a/tests/testthat/text-heatmap.R
+++ /dev/null
@@ -1,5 +0,0 @@
-test_that("returns a ggplot object", {
- x <- matrix(data = rnorm(100), nrow = 10)
- p <- heatmap(x)
- inherits(p, 'ggplot')
-})