diff --git a/tests/testthat/test-BiocBook.R b/tests/testthat/test-BiocBook.R index 0d7691e..7928d84 100644 --- a/tests/testthat/test-BiocBook.R +++ b/tests/testthat/test-BiocBook.R @@ -1,13 +1,13 @@ test_that("init work", { tmpdir <- paste0(paste0( - sample(c(seq(0, 9), LETTERS), 8, replace = TRUE), collapse = "" + sample(LETTERS, 5, replace = TRUE), + sample(c(seq(0, 9)), 5, replace = TRUE), + collapse = "" )) ## Utilities - expect_no_error( - init(tmpdir, .local = TRUE) - ) + expect_no_error( init(tmpdir, .local = TRUE)) expect_no_error( bb <- BiocBook(tmpdir)) expect_no_error( show(bb)) expect_no_error( path(bb)) @@ -24,10 +24,10 @@ test_that("init work", { expect_error( add_chapter(bb, title = 'Chapter 1', file = "chapter1", open = FALSE)) ## edit_* functions - expect_no_error( edit_yml(bb)) - expect_no_error( edit_css(bb)) - expect_no_error( edit_bib(bb)) - expect_no_error( edit_requirements_yml(bb)) + expect_no_error( edit_yml(bb, open = FALSE)) + expect_no_error( edit_css(bb, open = FALSE)) + expect_no_error( edit_bib(bb, open = FALSE)) + expect_no_error( edit_requirements_yml(bb, open = FALSE)) expect_no_error( edit_page(bb, file = '/inst/index.qmd', open = FALSE)) unlink(tmpdir, recursive = TRUE, force = TRUE)