Nothing
library(testthat)
library(shiny)
test_that("package_check returns FALSE for missing packages and shows error notification", {
# Mock requireNamespace to simulate a missing package
local_mocked_bindings(showNotification = function(...) {}) # Mock showNotification to avoid actual notifications
expect_false(package_check("nonexistentpkg"))
})
test_that("package_check returns TRUE for existing packages", {
# Mock requireNamespace to simulate a missing package
local_mocked_bindings(showNotification = function(...) {}) # Mock showNotification to avoid actual notifications
expect_true(package_check("testthat"))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.