-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_that desc with line breaks causes expect_snapshot to always be overwritten. #18
Comments
Thank you for pointing this out! I will make a note of this in test tools. BTW I started building this tiny package of BDD helpers that seems to be working (so far). I'll test it with snapshots 😃 |
Note that I think it only occurs when there are line breaks in the description. Code like this still works, as far as I tested:
|
I added a warning in test tools and included a shoutout 😃 . If you wrap the call to describe(
"Scenario:
Given
When
Then ",
code = {
test_that("fun()", code = {
expect_snapshot(fun())
})
}) |
Thank you for the shout out! Glad that the feedback was useful. Strange that it works when |
Short update, since I checked the source code of
is because I wrote a small pull request for the |
@mjfrigaard I saw that the small fix I proposed in |
Perhaps good to know that long descriptions in
testthat::describe()
ortestthat::test_that()
, as for example here, cause issues withtestthat::expect_snapshot()
for me. See the issue that I opened here.The text was updated successfully, but these errors were encountered: