Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
njtierney committed Jul 18, 2024
1 parent b4772cf commit 23687c8
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 30 deletions.
5 changes: 3 additions & 2 deletions tests/testthat/_snaps/vis-binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Code
vis_binary(iris)
Error <rlang_error>
data input can only contain binary values
Condition
Error in `test_if_all_binary()`:
! data input can only contain binary values
This means values are either 0 or 1, or NA.
Please subset the data to be binary values, or see `?vis_value.`

20 changes: 12 additions & 8 deletions tests/testthat/_snaps/vis-compare.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,39 @@

Code
vis_compare(iris, iris_add)
Error <rlang_error>
`vis_compare()` requires identical dimensions of `df1` and `df2`
Condition
Error in `vis_compare()`:
! `vis_compare()` requires identical dimensions of `df1` and `df2`
The dimensions of `df1` are: 150 and 5
The dimensions of `df2` are: 150 and 6

# vis_compare fails when an object of the wrong class is provided

Code
vis_compare(iris, AirPassengers)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

---

Code
vis_compare(AirPassengers, iris)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

---

Code
vis_compare(AirPassengers, AirPassengers)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

10 changes: 6 additions & 4 deletions tests/testthat/_snaps/vis-cor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Code
vis_cor(iris)
Error <rlang_error>
Data input can only contain numeric values
Condition
Error in `test_if_all_numeric()`:
! Data input can only contain numeric values
Please subset the data to the numeric values you would like.
`dplyr::select(<data>, where(is.numeric))`
Can be helpful here!
Expand All @@ -12,8 +13,9 @@

Code
vis_cor(AirPassengers)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

Expand Down
10 changes: 6 additions & 4 deletions tests/testthat/_snaps/vis-dat.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

Code
vis_dat(typical_data, palette = "wat")
Error <rlang_error>
Palette arguments need to be one of: 'qual', 'cb_safe', or 'default'
Condition
Error in `add_vis_dat_pal()`:
! Palette arguments need to be one of: 'qual', 'cb_safe', or 'default'
You palette argument was: `wat`

# vis_dat fails when an object of the wrong class is provided

Code
vis_dat(AirPassengers)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/_snaps/vis-expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Code
vis_expect(AirPassengers, ~ .x < 20)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

10 changes: 6 additions & 4 deletions tests/testthat/_snaps/vis-guess.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

Code
vis_guess(test_data, palette = "wat")
Error <rlang_error>
Palette arguments need to be one of: 'qual', 'cb_safe', or 'default'
Condition
Error in `add_vis_dat_pal()`:
! Palette arguments need to be one of: 'qual', 'cb_safe', or 'default'
You palette argument was: `wat`

# vis_guess fails when an object of the wrong class is provided

Code
vis_guess(AirPassengers)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

10 changes: 6 additions & 4 deletions tests/testthat/_snaps/vis-large.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

Code
vis_dat(big_df)
Error <rlang_error>
Data exceeds recommended size for visualisation
Condition
Error in `test_if_large_data()`:
! Data exceeds recommended size for visualisation
Consider downsampling your data with `dplyr::slice_sample()`
Or set argument, `warn_large_data` = `FALSE`

---

Code
vis_miss(big_df)
Error <rlang_error>
Data exceeds recommended size for visualisation
Condition
Error in `test_if_large_data()`:
! Data exceeds recommended size for visualisation
Consider downsampling your data with `dplyr::slice_sample()`
Or set argument, `warn_large_data` = `FALSE`

5 changes: 3 additions & 2 deletions tests/testthat/_snaps/vis-miss.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Code
vis_miss(AirPassengers)
Error <rlang_error>
`vis_dat()` requires a <data.frame>
Condition
Error in `test_if_dataframe()`:
! `vis_dat()` requires a <data.frame>
the object I see has class(es):
<ts>

Expand Down

0 comments on commit 23687c8

Please sign in to comment.