Running 'test_functions.r' [0s]
  Running 'testthat.r' [102s]
Running the tests in 'tests/testthat.r' failed.
Complete output:
  > library(testthat)
  > library(globaltrends)
  > 
  > test_check("globaltrends")
  [ FAIL 14 | WARN 19 | SKIP 0 | PASS 86 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-computations.R:8'): (code run outside of `test_that()`) ────────
  Error in `WDI::WDI(country = countries$location, indicator = "NY.GDP.MKTP.KD", 
      start = 2018, end = 2018)`: The following indicators could not be downloaded: NY.GDP.MKTP.KD.
  
  Please make sure that you are running the latest version of the `WDI` package, and that the arguments you are using in the `WDI()` function are valid.
  
  Sometimes, downloads will suddenly stop working, even if nothing has changed in the R code of the WDI package. ("The same WDI package version worked yesterday!") In those cases, the problem is almost certainly related to the World Bank servers or to your internet connection.
  
  You can check if the World Bank web API is currently serving the indicator(s) of interest by typing a URL of this form in your web browser:
  
  https://api.worldbank.org/v2/en/country/all/indicator/NY.GDP.MKTP.KD?format=json&date=:&per_page=32500&page=1
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-computations.R:8:0
   2.   └─globaltrends:::.enter_location(globaltrends_db = globaltrends_db)
   3.     └─WDI::WDI(...)
  ── Error ('test-db_functions.R:3'): initialize ─────────────────────────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. ├─testthat::capture_messages(initialize_db()) at test-db_functions.R:3:2
   2. │ └─base::withCallingHandlers(...)
   3. └─globaltrends::initialize_db()
  ── Error ('test-db_functions.R:74'): start1 ────────────────────────────────────
  Error in `db_query_fields.DBIConnection(con, ...)`: Can't query fields.
  Caused by error:
  ! no such table: data_doi
  Backtrace:
       ▆
    1. ├─testthat::capture_messages(start_db()) at test-db_functions.R:74:2
    2. │ └─base::withCallingHandlers(...)
    3. └─globaltrends::start_db()
    4.   ├─dplyr::tbl(globaltrends_db, "data_doi")
    5.   └─dplyr:::tbl.DBIConnection(globaltrends_db, "data_doi")
    6.     ├─dplyr::tbl(...)
    7.     └─dbplyr:::tbl.src_dbi(...)
    8.       └─dbplyr::tbl_sql(c(subclass, "dbi"), src = src, from = from, ...)
    9.         ├─vars %||% dbplyr_query_fields(src$con, from_sql)
   10.         └─dbplyr:::dbplyr_query_fields(src$con, from_sql)
   11.           └─dbplyr:::dbplyr_fallback(con, "db_query_fields", ...)
   12.             ├─rlang::eval_bare(expr((!!fun)(con, ...)))
   13.             └─dbplyr:::db_query_fields.DBIConnection(con, ...)
   14.               └─base::tryCatch(...)
   15.                 └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   16.                   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   17.                     └─value[[3L]](cond)
   18.                       └─cli::cli_abort("Can't query fields.", parent = cnd)
   19.                         └─rlang::abort(...)
  ── Error ('test-db_functions.R:109'): disconnect ───────────────────────────────
  Error in `db_query_fields.DBIConnection(con, ...)`: Can't query fields.
  Caused by error:
  ! no such table: data_doi
  Backtrace:
       ▆
    1. └─globaltrends::start_db() at test-db_functions.R:109:2
    2.   ├─dplyr::tbl(globaltrends_db, "data_doi")
    3.   └─dplyr:::tbl.DBIConnection(globaltrends_db, "data_doi")
    4.     ├─dplyr::tbl(...)
    5.     └─dbplyr:::tbl.src_dbi(...)
    6.       └─dbplyr::tbl_sql(c(subclass, "dbi"), src = src, from = from, ...)
    7.         ├─vars %||% dbplyr_query_fields(src$con, from_sql)
    8.         └─dbplyr:::dbplyr_query_fields(src$con, from_sql)
    9.           └─dbplyr:::dbplyr_fallback(con, "db_query_fields", ...)
   10.             ├─rlang::eval_bare(expr((!!fun)(con, ...)))
   11.             └─dbplyr:::db_query_fields.DBIConnection(con, ...)
   12.               └─base::tryCatch(...)
   13.                 └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   14.                   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   15.                     └─value[[3L]](cond)
   16.                       └─cli::cli_abort("Can't query fields.", parent = cnd)
   17.                         └─rlang::abort(...)
  ── Error ('test-downloads.R:8'): (code run outside of `test_that()`) ───────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-downloads.R:8:0
  ── Error ('test-export.R:8'): (code run outside of `test_that()`) ──────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-export.R:8:0
  ── Error ('test-keywords.R:7'): (code run outside of `test_that()`) ────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-keywords.R:7:0
  ── Error ('test-locations.R:8'): (code run outside of `test_that()`) ───────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-locations.R:8:0
  ── Error ('test-plot_bar.R:9'): (code run outside of `test_that()`) ────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-plot_bar.R:9:0
  ── Error ('test-plot_box.R:9'): (code run outside of `test_that()`) ────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-plot_box.R:9:0
  ── Error ('test-plot_map.R:9'): (code run outside of `test_that()`) ────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-plot_map.R:9:0
  ── Error ('test-plot_ts.R:9'): (code run outside of `test_that()`) ─────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-plot_ts.R:9:0
  ── Error ('test-plot_voi_doi.R:8'): (code run outside of `test_that()`) ────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-plot_voi_doi.R:8:0
  ── Error ('test-synonyms.R:8'): (code run outside of `test_that()`) ────────────
  Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists.
  Backtrace:
      ▆
   1. └─globaltrends::initialize_db() at test-synonyms.R:8:0
  
  [ FAIL 14 | WARN 19 | SKIP 0 | PASS 86 ]
  Error: Test failures
  Execution halted