Running ‘testthat.R’ [27s/43s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tidyjson)
  
  Attaching package: 'tidyjson'
  
  The following object is masked from 'package:stats':
  
      filter
  
  > 
  > test_check("tidyjson")
  ── 1. Error: simple array works (@test-json_structure.R#54)  ───────────────────
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 4 columns.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 5 columns.
  Backtrace:
    1. testthat::expect_identical(...)
   10. tidyjson::json_structure(.)
   15. tidyjson:::json_structure_level(...)
   12. tidyjson:::json_structure_arrays(.)
    5. dplyr::filter(., type == "array")
   12. dplyr::transmute(...)
   41. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   42. dplyr:::dplyr_col_select(out, keep)
  
  ── 2. Error: seq works for a deeply nested sequence (@test-json_structure.R#145)
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 4 columns.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 5 columns.
  Backtrace:
    1. testthat::expect_identical(...)
    9. tidyjson::json_structure(.)
   14. tidyjson:::json_structure_level(...)
   12. tidyjson:::json_structure_objects(.)
    5. dplyr::filter(., type == "object")
   12. dplyr::transmute(...)
   40. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   41. dplyr:::dplyr_col_select(out, keep)
  
  ── 3. Error: imputes document.id when not present (@test-json_structure.R#168)  
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 4 columns.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 5 columns.
  Backtrace:
    1. dplyr::tibble(id = 1, json = "[\"a\"]")
    1. tidyjson::as.tbl_json(., json.column = "json")
    9. tidyjson::json_structure(.)
   12. tidyjson:::json_structure_level(...)
   13. tidyjson:::json_structure_arrays(.)
    6. dplyr::filter(., type == "array")
   13. dplyr::transmute(...)
   38. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   39. dplyr:::dplyr_col_select(out, keep)
  
  ── 4. Error: imputed document.id works (@test-json_structure.R#181)  ───────────
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 4 columns.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 5 columns.
  Backtrace:
    1. dplyr::tibble(id = 1, json = "[{\"a\":1},{\"a\":2}]")
    1. tidyjson::as.tbl_json(., json.column = "json")
    1. tidyjson::gather_array(.)
    9. tidyjson::json_structure(.)
   12. tidyjson:::json_structure_level(...)
   14. tidyjson:::json_structure_objects(.)
    7. dplyr::filter(., type == "object")
   14. dplyr::transmute(...)
   38. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   39. dplyr:::dplyr_col_select(out, keep)
  
  ── 5. Error: dplyr::transmute works (@test-tbl_json.R#552)  ────────────────────
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 1 column.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 2 columns.
  Backtrace:
    9. dplyr::transmute(., string = paste0(string, "_hi"))
   16. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   17. dplyr:::dplyr_col_select(out, keep)
  
  ── 6. Error: dplyr::transmute works (@test-tbl_json.R#601)  ────────────────────
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 1 column.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 2 columns.
  Backtrace:
    1. tidyjson::gather_array(.)
    9. dplyr::transmute(., blah = document.id)
   16. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   17. dplyr:::dplyr_col_select(out, keep)
  
  ── 7. Error: dplyr::transmute works with programming (@test-tbl_json.R#720)  ───
  Can't reconstruct data frame.
  ✖ The `[` method for class <tbl_json/tbl_df/tbl/data.frame> must return a data frame with 1 column.
  ℹ It returned a <tbl_json/tbl_df/tbl/data.frame> of 2 columns.
  Backtrace:
    1. tidyjson::spread_all(.)
    9. dplyr::transmute(., !!!v)
   16. dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   17. dplyr:::dplyr_col_select(out, keep)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 302 | SKIPPED: 18 | WARNINGS: 0 | FAILED: 7 ]
  1. Error: simple array works (@test-json_structure.R#54) 
  2. Error: seq works for a deeply nested sequence (@test-json_structure.R#145) 
  3. Error: imputes document.id when not present (@test-json_structure.R#168) 
  4. Error: imputed document.id works (@test-json_structure.R#181) 
  5. Error: dplyr::transmute works (@test-tbl_json.R#552) 
  6. Error: dplyr::transmute works (@test-tbl_json.R#601) 
  7. Error: dplyr::transmute works with programming (@test-tbl_json.R#720) 
  
  Error: testthat unit tests failed
  Execution halted