Skip to content

support transform argument from testthat in app$expect_*() #396

Closed

Description

@maxheld83

testthat's expect_snapshot() has a neat transform argument, which lets you run, well, transformations on values before they are submitted to comparison.

transform
Optionally, a function to scrub sensitive or stochastic text from the output. Should take a character vector of lines as input and return a modified character vector as output.

(source https://testthat.r-lib.org/reference/expect_snapshot.html?q=transform#ref-usage)

Would be nice if the relevant shinytest2 functions also supported this.

Activity

  1. added a commit that references this issue on Feb 11, 2025
    4fbcfce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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