diff --git a/DESCRIPTION b/DESCRIPTION index 09a10276c..aa724825b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,6 +20,7 @@ Imports: callr, cli, digest, + DT, ellipsis, git2r (>= 0.23.0), httr (>= 0.4), diff --git a/NAMESPACE b/NAMESPACE index a201e9c0e..45e2a79f3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -82,6 +82,7 @@ export(update_packages) export(uses_testthat) export(wd) export(with_debug) +importFrom(DT,datatable) importFrom(cli,cat_bullet) importFrom(cli,cat_line) importFrom(cli,cat_rule) diff --git a/NEWS.md b/NEWS.md index 00bf68b0d..3a5f83e3d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # devtools (development version) +* Add the DT package as a dependency, so that `test_coverage()` and + `test_coverage_file()` work without having to install additional packages + (#2085). + * All functions taking `...` now use the ellipsis package. This catches errors when arguments are misspelled or incorrectly specified (#2016) diff --git a/R/test.R b/R/test.R index ef493defc..fb469f4e6 100644 --- a/R/test.R +++ b/R/test.R @@ -82,6 +82,8 @@ test <- function(pkg = ".", filter = NULL, ...) { #' @param show_report Show the test coverage report. #' @export #' @rdname test +#' @importFrom DT datatable +# we now depend on DT in devtools so DT is installed when users call test_coverage test_coverage <- function(pkg = ".", show_report = interactive(), ...) { pkg <- as.package(pkg)