Running 'testthat.R' [33s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(iNZightTools)
  
  Attaching package: 'iNZightTools'
  
  The following object is masked from 'package:stats':
  
      filter
  
  > 
  > test_check("iNZightTools")
  Loading required package: survey
  Loading required package: grid
  Loading required package: Matrix
  Loading required package: survival
  
  Attaching package: 'survey'
  
  The following object is masked from 'package:graphics':
  
      dotchart
  
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Loading required namespace: styler
  Failed with error:  '.onLoad failed in loadNamespace() for 'styler', details:
    call: .difftime(tim, units = units)
    error: could not find function ".difftime"'
  In addition: There were 50 or more warnings (use warnings() to see the first 50)
  Loading required namespace: styler
  Failed with error:  '.onLoad failed in loadNamespace() for 'styler', details:
    call: .difftime(tim, units = units)
    error: could not find function ".difftime"'
  Loading required namespace: styler
  Failed with error:  '.onLoad failed in loadNamespace() for 'styler', details:
    call: .difftime(tim, units = units)
    error: could not find function ".difftime"'
  Loading required namespace: styler
  Failed with error:  '.onLoad failed in loadNamespace() for 'styler', details:
    call: .difftime(tim, units = units)
    error: could not find function ".difftime"'
  Loading required namespace: styler
  Failed with error:  '.onLoad failed in loadNamespace() for 'styler', details:
    call: .difftime(tim, units = units)
    error: could not find function ".difftime"'
  [ FAIL 5 | WARN 75 | SKIP 4 | PASS 358 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test_smart_read.R:27:5', 'test_smart_read.R:253:5'
  • URL not available. (1): 'test_smart_read.R:203:5'
  • surveyspec cannot be loaded (1): 'test_survey_design.R:4:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_tidy_code.R:5:5'): Cody tidying does not break code ────────────
  Error in `FUN(X[[i]], ...)`: Please install suggested package: 'styler'
  Backtrace:
      ▆
   1. └─iNZightTools::tidy_all_code(x) at test_tidy_code.R:5:4
   2.   └─base::sapply(allcode, tidy_code, width = width, indent = indent)
   3.     └─base::lapply(X = X, FUN = FUN, ...)
   4.       └─iNZightTools (local) FUN(X[[i]], ...)
  ── Error ('test_tidy_code.R:26:5'): Code writing can remove library calls ──────
  Error in `FUN(X[[i]], ...)`: Please install suggested package: 'styler'
  Backtrace:
      ▆
   1. └─iNZightTools::tidy_all_code(x, incl_library = FALSE) at test_tidy_code.R:26:4
   2.   └─base::sapply(allcode, tidy_code, width = width, indent = indent)
   3.     └─base::lapply(X = X, FUN = FUN, ...)
   4.       └─iNZightTools (local) FUN(X[[i]], ...)
  ── Error ('test_tidy_code.R:32:5'): Cody tidying does not break code 2 ─────────
  Error in `FUN(X[[i]], ...)`: Please install suggested package: 'styler'
  Backtrace:
      ▆
   1. └─iNZightTools::tidy_all_code(x) at test_tidy_code.R:32:4
   2.   └─base::sapply(allcode, tidy_code, width = width, indent = indent)
   3.     └─base::lapply(X = X, FUN = FUN, ...)
   4.       └─iNZightTools (local) FUN(X[[i]], ...)
  ── Error ('test_tidy_code.R:53:5'): print_code works OK ────────────────────────
  Error in `FUN(X[[i]], ...)`: Please install suggested package: 'styler'
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test_tidy_code.R:53:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::eval(parse(text = capture.output(print_code(dat))))
    5. ├─base::parse(text = capture.output(print_code(dat)))
    6. ├─utils::capture.output(print_code(dat))
    7. │ └─base::withVisible(...elt(i))
    8. └─iNZightTools::print_code(dat)
    9.   └─iNZightTools::tidy_all_code(c, ...)
   10.     └─base::sapply(allcode, tidy_code, width = width, indent = indent)
   11.       └─base::lapply(X = X, FUN = FUN, ...)
   12.         └─iNZightTools (local) FUN(X[[i]], ...)
  ── Error ('test_tidy_code.R:66:5'): tidying from file works OK ─────────────────
  Error in `FUN(X[[i]], ...)`: Please install suggested package: 'styler'
  Backtrace:
      ▆
   1. └─iNZightTools::tidy_all_code("messy_gapminder.txt") at test_tidy_code.R:66:4
   2.   └─base::sapply(allcode, tidy_code, width = width, indent = indent)
   3.     └─base::lapply(X = X, FUN = FUN, ...)
   4.       └─iNZightTools (local) FUN(X[[i]], ...)
  
  [ FAIL 5 | WARN 75 | SKIP 4 | PASS 358 ]
  Error: Test failures
  Execution halted