Running ‘testthat.R’ [3s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "") # Added based on suggestion here: https://github.com/r-lib/testthat/issues/86
  > library(testthat)
  > library(priceR)
  > 
  > test_check("priceR")
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  
  Attaching package: 'lubridate'
  
  The following objects are masked from 'package:base':
  
      date, intersect, setdiff, union
  
  
  Attaching package: 'purrr'
  
  The following object is masked from 'package:jsonlite':
  
      flatten
  
  The following object is masked from 'package:testthat':
  
      is_null
  
  Using libcurl 7.69.1 with OpenSSL/1.1.1k-fips
  Validating iso2Code for AU 
  Generating URL to request all 297 results
  Retrieving inflation data for AU 
  Generating URL to request all 61 results
  Generating URL to request all 297 results
  Generating URL to request all 297 results
  Generating URL to request all 297 results
  Generating URL to request all 297 results
  Validating iso2Code for AU 
  Generating URL to request all 297 results
  Retrieving inflation data for AU 
  Generating URL to request all 61 results
  Validating iso2Code for Australia 
  Generating URL to request all 297 results
  Retrieving inflation data for AU 
  Generating URL to request all 61 results
  Validating iso2Code for AustraTESTlia 
  Generating URL to request all 297 results
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_format.R:11:3): format_currency() correctly inserts commas and symbol to integer value ──
  Error: invalid value 0 for 'digits' argument
  Backtrace:
       █
    1. ├─testthat::expect_equal(...) test_format.R:11:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─priceR::format_currency("2423562534234", "$")
    5. │ └─`%>%`(...)
    6. ├─base::paste0(symbol, .)
    7. ├─base::trimws(.)
    8. │ ├─base:::mysub(...)
    9. │ │ └─base::sub(re, "", x, perl = TRUE)
   10. │ │   └─base::is.factor(x)
   11. │ └─base:::mysub(paste0("^", whitespace, "+"), x)
   12. │   └─base::sub(re, "", x, perl = TRUE)
   13. │     └─base::is.factor(x)
   14. ├─base::format(...)
   15. └─base::format.default(...)
   16.   └─base::prettyNum(...)
  ── Error (test_format.R:20:3): format_currency() correctly inserts commas and symbol to decimal value and
            rounds to zero decimal places ──
  Error: invalid value 0 for 'digits' argument
  Backtrace:
       █
    1. ├─testthat::expect_equal(...) test_format.R:20:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─priceR::format_currency("2423562534234.876", "$", 0)
    5. │ └─`%>%`(...)
    6. ├─base::paste0(symbol, .)
    7. ├─base::trimws(.)
    8. │ ├─base:::mysub(...)
    9. │ │ └─base::sub(re, "", x, perl = TRUE)
   10. │ │   └─base::is.factor(x)
   11. │ └─base:::mysub(paste0("^", whitespace, "+"), x)
   12. │   └─base::sub(re, "", x, perl = TRUE)
   13. │     └─base::is.factor(x)
   14. ├─base::format(...)
   15. └─base::format.default(...)
   16.   └─base::prettyNum(...)
  ── Error (test_format.R:53:3): format_dollars() correctly inserts commas and symbol to integer value ──
  Error: invalid value 0 for 'digits' argument
  Backtrace:
       █
    1. ├─testthat::expect_equal(format_dollars("2423562534234"), "$2,423,562,534,234") test_format.R:53:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─priceR::format_dollars("2423562534234")
    5. │ └─priceR::format_currency(amount, "$", digits)
    6. │   └─`%>%`(...)
    7. ├─base::paste0(symbol, .)
    8. ├─base::trimws(.)
    9. │ ├─base:::mysub(...)
   10. │ │ └─base::sub(re, "", x, perl = TRUE)
   11. │ │   └─base::is.factor(x)
   12. │ └─base:::mysub(paste0("^", whitespace, "+"), x)
   13. │   └─base::sub(re, "", x, perl = TRUE)
   14. │     └─base::is.factor(x)
   15. ├─base::format(...)
   16. └─base::format.default(...)
   17.   └─base::prettyNum(...)
  ── Error (test_format.R:61:13): format_dollars() correctly inserts commas and symbol to decimal value and
            rounds to zero decimal places ──
  Error: invalid value 0 for 'digits' argument
  Backtrace:
       █
    1. ├─testthat::expect_equal(...) test_format.R:61:12
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─priceR::format_dollars("2423562534234.876", 0)
    5. │ └─priceR::format_currency(amount, "$", digits)
    6. │   └─`%>%`(...)
    7. ├─base::paste0(symbol, .)
    8. ├─base::trimws(.)
    9. │ ├─base:::mysub(...)
   10. │ │ └─base::sub(re, "", x, perl = TRUE)
   11. │ │   └─base::is.factor(x)
   12. │ └─base:::mysub(paste0("^", whitespace, "+"), x)
   13. │   └─base::sub(re, "", x, perl = TRUE)
   14. │     └─base::is.factor(x)
   15. ├─base::format(...)
   16. └─base::format.default(...)
   17.   └─base::prettyNum(...)
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 30 ]
  Error: Test failures
  Execution halted