Skip to content

expect_equal_to_reference default behavior changed #683

@brodieG

Description

@brodieG

With the transition to expect_known, I think there was a regression introduced with respect to expect_equal_to_reference :

 #' @export
-#' @rdname expect_known_value
+#' @rdname expect_known_output
 #' @usage NULL
-expect_equal_to_reference <- expect_known_value
+expect_equal_to_reference <- function(..., update = FALSE) {
+  expect_known_value(..., update = TRUE)
+}

Should be:

expect_equal_to_reference <- function(..., update = FALSE) {
  expect_known_value(..., update = update)
}

Happy to submit a PR if you want, but it may be easier for you guys to fix. Let me know. For reference, the NEWS entry suggests the change is not intentional:

expect_known_value() replaces expect_equal_to_reference(), which has been soft-deprecated. It gains an update argument defaulting to TRUE. This changes behaviour from the previous version, and soft-deprecated expect_equal_to_reference() gets update = FALSE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions