-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9aa57ef
commit b0cdf32
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
context("testing shiny emissions app") | ||
|
||
# Expand on unit testing for shiny app | ||
# Helper function to check if the returned value is a Shiny app | ||
is_shiny_app <- function(x) { | ||
inherits(x, "shiny.appobj") | ||
} | ||
|
||
test_that("returned object is shiny.appobj", { | ||
expect_equal(class(shiny_emissions()), c("shiny.appobj")) | ||
# Test to ensure that shiny_emissions function executes and returns a Shiny app | ||
test_that("shiny_emissions launches a Shiny app", { | ||
# Call the shiny_emissions function | ||
app <- shiny_emissions() | ||
|
||
# Check if the output is a Shiny app object | ||
expect_true(is_shiny_app(app)) | ||
}) |