From e6f6a49b41a26b184cbdc7b3f532f3deef01031d Mon Sep 17 00:00:00 2001 From: Chris Sobczak Date: Mon, 6 Jul 2026 14:34:31 -0700 Subject: Fix factors --- tests/testthat/test-heatmap.R | 23 +++++++++++++++++++++++ tests/testthat/text-heatmap.R | 5 ----- 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 tests/testthat/test-heatmap.R delete mode 100644 tests/testthat/text-heatmap.R (limited to 'tests/testthat') 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') -}) -- cgit v1.2.3