Running ‘testthat.R’ [20s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(atlantistools)
  > 
  > test_check("atlantistools")
  ── 1. Error: (unknown) (@test-diet-fishbase.R#9)  ──────────────────────────────
  `nm` must be `NULL` or a character vector the same length as `x`
  1: get_diet_fishbase(c("Gadus morhua", "Merlangius merlangus", "Maurolicus muelleri")) at testthat/test-diet-fishbase.R:9
  2: purrr::map2_df(.x = result[ids], .y = fish[ids], ~tibble::add_column(.x, rep(.y, 
         times = nrow(.x)))) %>% tibble::as_tibble(.) %>% purrr::set_names(., df_names)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: purrr::set_names(., df_names)
  11: set_names_impl(x, x, nm, ...)
  12: abort("`nm` must be `NULL` or a character vector the same length as `x`")
  
  ── 2. Failure: test extraction of references for sprat (@test-growth-fishbase.R#
  stringr::str_detect(df3$ref[df3$ref_id == 1231], "Zupanovic, S., 1961. Contribution") isn't true.
  
  ── 3. Failure: test extraction of references for sprat (@test-growth-fishbase.R#
  all(stringr::str_detect(tests, "Main Ref. :")) isn't true.
  
  ── 4. Failure: test extraction of references for sprat (@test-growth-fishbase.R#
  all(stringr::str_detect(tests, "Data Ref. :")) isn't true.
  
  ── 5. Failure: test extraction of references for sprat (@test-growth-fishbase.R#
  all(stringr::str_detect(tests, "Data Type :")) isn't true.
  
  ── 6. Failure: test extraction of references for sprat (@test-growth-fishbase.R#
  url_to_refid(test_url) not equal to c(312, 1231).
  2/2 mismatches (average diff: NaN)
  [1] NA -  312 == NA
  [2] NA - 1231 == NA
  
  ── 7. Error: (unknown) (@test-growth-fishbase.R#51)  ───────────────────────────
  invalid 'times' argument
  1: suppressWarnings(get_growth_fishbase(c("Alosa agone", "Scyliorhinus canicula"))) at testthat/test-growth-fishbase.R:51
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: get_growth_fishbase(c("Alosa agone", "Scyliorhinus canicula"))
  4: purrr::map2(.x = result, .y = names(ids), ~tibble::add_column(.x, rep(.y, times = nrow(.x)))) %>% 
         do.call(rbind, args = .) %>% purrr::set_names(., c("xxx", "linf", "length_type", 
         "k", "to", "sex", "m", "temp", "lm", "a", "country", "locality", "questionable", 
         "captive", "species"))
  5: eval(lhs, parent, parent)
  6: eval(lhs, parent, parent)
  7: purrr::map2(.x = result, .y = names(ids), ~tibble::add_column(.x, rep(.y, times = nrow(.x))))
  8: .f(.x[[i]], .y[[i]], ...)
  9: tibble::add_column(.x, rep(.y, times = nrow(.x)))
  10: tibble(...)
  11: as_tibble(lst_quos(xs, expand = TRUE))
  12: lst_quos(xs, expand = TRUE)
  13: eval_tidy(xs[[i]], unique_output)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 187 SKIPPED: 1 FAILED: 7
  1. Error: (unknown) (@test-diet-fishbase.R#9) 
  2. Failure: test extraction of references for sprat (@test-growth-fishbase.R#25) 
  3. Failure: test extraction of references for sprat (@test-growth-fishbase.R#44) 
  4. Failure: test extraction of references for sprat (@test-growth-fishbase.R#45) 
  5. Failure: test extraction of references for sprat (@test-growth-fishbase.R#46) 
  6. Failure: test extraction of references for sprat (@test-growth-fishbase.R#47) 
  7. Error: (unknown) (@test-growth-fishbase.R#51) 
  
  Error: testthat unit tests failed
  Execution halted