Skip to content
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

testthat 3.1.1 and empty lines in snapshots #1509

Closed
maelle opened this issue Dec 6, 2021 · 3 comments · Fixed by #1524
Closed

testthat 3.1.1 and empty lines in snapshots #1509

maelle opened this issue Dec 6, 2021 · 3 comments · Fixed by #1524
Labels
bug an unexpected problem or unintended behavior snapshot 📷
Milestone

Comments

@maelle
Copy link
Contributor

maelle commented Dec 6, 2021

With testthat 3.1.1 empty lines are removed from snapshots.

E.g. if a function is

bla <- function() {
  cli::cli_inform("thing")
  cli::cli_h2("bla")
  cli::cli_inform("another thing")
}

the snapshot will show no empty lines before and after the H2 whereas it used to.

@maelle
Copy link
Contributor Author

maelle commented Dec 6, 2021

@zkamvar
Copy link

zkamvar commented Dec 13, 2021

I'm curious, if we went ahead and fixed these broken snaps, will they break again on a newer release?

@hadley
Copy link
Member

hadley commented Dec 13, 2021

Yes

@hadley hadley added bug an unexpected problem or unintended behavior snapshot 📷 labels Dec 20, 2021
@hadley hadley added this to the v3.1.2 milestone Dec 20, 2021
hadley added a commit that referenced this issue Jan 6, 2022
jennybc added a commit to tidyverse/readr that referenced this issue Jan 25, 2022
jennybc added a commit to tidyverse/readr that referenced this issue Jan 25, 2022
* Let's get a baseline before introducing real change

I predict test failure, due to changes in testthat 3.1.2.

* Re-establish the organization, with printing tests in the printing section

* Update col_spec tests (at least for edition 2)

* Update col spec test snapshots for edition 1

* Update first edition snapsots for whitespace

I guess I'm seeing the effects of

r-lib/testthat#1509
r-lib/testthat#1524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior snapshot 📷
Projects
None yet
3 participants