diff --git a/R/navs-legacy.R b/R/navs-legacy.R index ad8626c9d..2ed977f69 100644 --- a/R/navs-legacy.R +++ b/R/navs-legacy.R @@ -216,6 +216,8 @@ navbar_options <- function( underline = missing(underline) ) + rlang::check_dots_empty() + opts <- list( position = rlang::arg_match(position), bg = bg, diff --git a/tests/testthat/test-navs-legacy.R b/tests/testthat/test-navs-legacy.R index 85a7882ed..4847aac21 100644 --- a/tests/testthat/test-navs-legacy.R +++ b/tests/testthat/test-navs-legacy.R @@ -20,6 +20,10 @@ test_that("navbar_options() print method", { ) }) +test_that("navbar_options() errors if ... swallows unused options", { + expect_error(navbar_options(foo = "bar")) +}) + test_that("navbar_options_resolve_deprecated() consolidates correctly", { # TODO-deprecated: Remove when direction options are deprecated with an error