Skip to content

Commit

Permalink
update test-golem-rec to not run code outside of test_that()
Browse files Browse the repository at this point in the history
  • Loading branch information
AARON-CLARK committed Jan 7, 2023
1 parent bbd2c82 commit fa57971
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BugReports: https://github.com/pharmaR/risk_assessment/issues
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1.9000
RoxygenNote: 7.2.2
Imports:
bslib (>= 0.3.0),
config (>= 0.3.1),
Expand Down
28 changes: 14 additions & 14 deletions tests/testthat/test-golem-recommended.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ test_that(
}
)

# Configure this test to fit your need.
# testServer() function makes it possible to test code in server functions and modules, without needing to run the full Shiny application
testServer(app_server, {

# Set and test an input
session$setInputs(x = 2)
expect_equal(input$x, 2)

# Example of tests you can do on the server:
# - Checking reactiveValues
# expect_equal(r$lg, 'EN')
# - Checking output
# expect_equal(output$txt, "Text")
})
# # Configure this test to fit your need.
# # testServer() function makes it possible to test code in server functions and modules, without needing to run the full Shiny application
# testServer(app_server, {
#
# # Set and test an input
# session$setInputs(x = 2)
# expect_equal(input$x, 2)
#
# # Example of tests you can do on the server:
# # - Checking reactiveValues
# # expect_equal(r$lg, 'EN')
# # - Checking output
# # expect_equal(output$txt, "Text")
# })

# Configure this test to fit your need
test_that(
Expand Down

0 comments on commit fa57971

Please sign in to comment.