inst/examples/snapshot_test/tests/testthat/steps/steps.R

given("I have a text", function(text, context) {
  context$text <- text
})

then("the output should be saved in a snapshot", function(context) {
  testthat::expect_snapshot(context$text)
})

Try the cucumber package in your browser

Any scripts or data that you put into this service are public.

cucumber documentation built on June 30, 2024, 1:07 a.m.