Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > #R
  > 
  > library(testthat)
  > 
  > suppressPackageStartupMessages(library(deisotoper))
  > 
  > test_check("deisotoper")
  ── 1. Error: (unknown) (@test-deisotoper.R#5)  ─────────────────────────────────
  no field, method or inner class called 'handled' 
  1: test_that("test deisotoper::deisotoper", {
         x0 <- list(mZ = c(101, 102, 102.5, 103), intensity = rep(1, 4), pepmass = 600, 
             charge = 2)
         x1 <- list(mZ = c(101.01, 102, 102.5, 103), intensity = rep(1, 4), pepmass = 600, 
             charge = 2)
         dtoper <- deisotoper()
         xd0 <- deisotope(dtoper, x0)
         xd1 <- deisotope(dtoper, x1)
         expect_true(sum(xd0$intensity) == sum(x0$intensity))
         expect_true(sum(xd1$intensity) == sum(x1$intensity))
         expect_true(xd0$mZ == c(101, 102.51) && rep(TRUE, 2))
         expect_true(xd1$mZ == c(101.01, 102) && rep(TRUE, 2))
         expect_true(xd0$intensity == c(3, 1) && rep(TRUE, 2))
         expect_true(xd1$intensity == c(1, 3) && rep(TRUE, 2))
     }) at testthat/test-deisotoper.R:5
  2: test_code(desc, code, env = parent.frame())
  3: tryCatch(withCallingHandlers({
         eval(code, test_env)
         if (!handled && !is.null(test)) {
             skip_empty()
         }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
         message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) {
     })
  4: tryCatchList(expr, classes, parentenv, handlers)
  5: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], 
         parentenv, handlers[[nh]])
  6: doTryCatch(return(expr), name, parentenv, handler)
  7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  10: isTRUE(e$handled)
  11: e$handled
  12: `$.Throwable`(e, "handled")
  13: ._jobjRef_dollar(x[["jobj"]], name)
  14: stop(sprintf("no field, method or inner class called '%s' ", name))
  
  ── 2. Error: test deisotoper::findNN (@test-findNN.R#12)  ──────────────────────
  the argument has already been evaluated
  1: lapply(deisotoper::findNN(DB, DB) == 1:length(DB), expect_true) at testthat/test-findNN.R:12
  2: FUN(X[[i]], ...)
  3: quasi_label(enquo(object), label)
  4: force(quo)
  5: enquo(object)
  6: eval_bare(capture, caller_env())
  7: (function (x, strict = TRUE) 
     {
         caller_env <- parent.frame()
         if (identical(caller_env, globalenv())) {
             stop("must be called in a function")
         }
         if (missing(x)) {
             stop("argument \"x\" is missing")
         }
         .Call(rlang_capturearg, NULL, NULL, pairlist(caller_env, strict), get_env())
     })(object)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 1 SKIPPED: 0 FAILED: 2
  1. Error: (unknown) (@test-deisotoper.R#5) 
  2. Error: test deisotoper::findNN (@test-findNN.R#12) 
  
  Error: testthat unit tests failed
  Execution halted