Running ‘testthat.R’ [7s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(pregnancy)
  > 
  > test_check("pregnancy")
  i On March 26, 2025, you were 12 weeks pregnant.
  i Estimated due date: Tuesday, November 07, 2023
  i Estimated birth period begins: October 17, 2023 (37 weeks)
  i Estimated birth period ends: November 21, 2023 (42 weeks)
  i Estimated due date: Tuesday, November 07, 2023
  i Estimated birth period begins: October 17, 2023 (37 weeks)
  i Estimated birth period ends: November 21, 2023 (42 weeks)
  i Estimated due date: Tuesday, October 24, 2023
  i Estimated birth period begins: October 03, 2023 (37 weeks)
  i Estimated birth period ends: November 07, 2023 (42 weeks)
  i Estimated due date: Saturday, October 21, 2023
  i Estimated birth period begins: September 30, 2023 (37 weeks)
  i Estimated birth period ends: November 04, 2023 (42 weeks)
  i Estimated due date: Thursday, October 19, 2023
  i Estimated birth period begins: September 28, 2023 (37 weeks)
  i Estimated birth period ends: November 02, 2023 (42 weeks)
  i Estimated due date: Wednesday, October 18, 2023
  i Estimated birth period begins: September 27, 2023 (37 weeks)
  i Estimated birth period ends: November 01, 2023 (42 weeks)
  i Estimated due date: Monday, November 06, 2023
  i Estimated birth period begins: October 16, 2023 (37 weeks)
  i Estimated birth period ends: November 20, 2023 (42 weeks)
  i Estimated due date: Wednesday, November 08, 2023
  i Estimated birth period begins: October 18, 2023 (37 weeks)
  i Estimated birth period ends: November 22, 2023 (42 weeks)
  i Your due date is set as January 31, 2023.
  ! You do not have `pregnancy.due_date` set as an option.
  i You can set it with `set_due_date()`.
  i You can also pass a value directly to the `due_date` argument where required.
  v Due date set as April 30, 2023
  i Functions in the pregnancy package will now use this `due_date` option.
  i So, for this R session, you do not need to supply a value to the `due_date` argument (unless you wish to override the option).
  i To make this `due_date` option available in all R sessions, in your ".Rprofile", set `options(pregnancy.due_date = ...)`
    where ... is the value of `due_date`.
  i You can edit your ".Rprofile" by calling `usethis::edit_r_profile()`
  i You can retrieve the `due_date` option with `get_due_date()`,
    or with `getOption('pregnancy.due_date')`.
  v Due date set as April 30, 2023
  i Functions in the pregnancy package will now use this `due_date` option.
  i So, for this R session, you do not need to supply a value to the `due_date` argument (unless you wish to override the option).
  i To make this `due_date` option available in all R sessions, in your ".Rprofile", set `options(pregnancy.due_date = ...)`
    where ... is the value of `due_date`.
  i You can edit your ".Rprofile" by calling `usethis::edit_r_profile()`
  i You can retrieve the `due_date` option with `get_due_date()`,
    or with `getOption('pregnancy.due_date')`.
  v pregnancy.due_date option set to NULL.
  i You will need to explicitly pass a value to the `due_date` argument
    in functions that use it, or reset the option with `set_due_date()`.
  Saving _problems/test-how_far-301.R
  i Estimated test date (urine): Tuesday, February 28, 2023
  i Estimated test date (blood): Sunday, February 26, 2023
  i Estimated test date (urine): Tuesday, February 28, 2023
  i Estimated test date (blood): Sunday, February 26, 2023
  i Estimated test date (urine): Tuesday, February 14, 2023
  i Estimated test date (blood): Sunday, February 12, 2023
  i Estimated test date (urine): Saturday, February 11, 2023
  i Estimated test date (blood): Thursday, February 09, 2023
  i Estimated test date (urine): Thursday, February 09, 2023
  i Estimated test date (blood): Tuesday, February 07, 2023
  i Estimated test date (urine): Wednesday, February 08, 2023
  i Estimated test date (blood): Monday, February 06, 2023
  i Estimated test date (urine): Tuesday, February 28, 2023
  i Estimated test date (blood): Sunday, February 26, 2023
  i Estimated test date (urine): Monday, February 27, 2023
  i Estimated test date (blood): Saturday, February 25, 2023
  i Estimated test date (urine): Wednesday, March 01, 2023
  i Estimated test date (blood): Monday, February 27, 2023
  [ FAIL 1 | WARN 0 | SKIP 7 | PASS 226 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • On CRAN (7): 'test-due_date.R:84:1', 'test-test_date.R:91:1',
    'test-utils.R:85:1', 'test-utils.R:94:1', 'test-utils.R:99:1',
    'test-utils.R:104:1', 'test-utils.R:111:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-how_far.R:298:3'): how_far_message handles under 0 days appropriately, in the future ──
  Expected `result$messages[1]` to match regexp "Given a due date of January 01, 2027, on January 01, 2026, you will not yet be pregnant.".
  Actual text:
  x | Given a due date of January 01, 2027, on January 01, 2026, you would have not yet been pregnant.
  
  [ FAIL 1 | WARN 0 | SKIP 7 | PASS 226 ]
  Error:
  ! Test failures.
  Execution halted