Fix issues #1, #3, #5: misc improvements
R-CMD-check / R CMD check (pull_request) Failing after 4m43s
R-CMD-check / R CMD check (pull_request) Failing after 4m43s
- #5: Unwrap _brand.yml for Quarto 1.9+ compatibility (remove top-level brand: wrapper so meta/logo/color/typography are at the top level) - #1: Add quiet parameter to na_sum() to suppress warnings in loops/pipelines - #3: Add beep() function for CLI beep, desktop notifications, and webhook alerts (supports type=beep|notify|webhook|all)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Test beep / notification function
|
||||
|
||||
context("Test beep() function")
|
||||
|
||||
test_that("beep() returns invisibly", {
|
||||
expect_invisible(beep())
|
||||
expect_invisible(beep("test", type = "beep"))
|
||||
expect_invisible(beep("test", type = "all"))
|
||||
})
|
||||
|
||||
test_that("beep() with quiet=TRUE produces no output", {
|
||||
expect_silent(beep("test", type = "beep", quiet = TRUE))
|
||||
})
|
||||
|
||||
test_that("beep() with type=notify is silent when no tools available", {
|
||||
# When notify-send and osascript are both absent, should be silent
|
||||
expect_silent(beep("test", type = "notify"))
|
||||
})
|
||||
|
||||
test_that("beep() with type=webhook and no URL is silent", {
|
||||
expect_silent(beep("test", type = "webhook"))
|
||||
})
|
||||
Reference in New Issue
Block a user