From 3b74227e3385b71165a450458f5b3978da4d1980 Mon Sep 17 00:00:00 2001 From: Jackson Hoffart Date: Tue, 20 Feb 2024 16:11:14 +0100 Subject: [PATCH] update snaps --- .../_snaps/plot_emission_intensity.md | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/testthat/_snaps/plot_emission_intensity.md b/tests/testthat/_snaps/plot_emission_intensity.md index 354acfe9..01859af3 100644 --- a/tests/testthat/_snaps/plot_emission_intensity.md +++ b/tests/testthat/_snaps/plot_emission_intensity.md @@ -1,26 +1,33 @@ # if `data` is not a data frame errors gracefully - is.data.frame(data) is not TRUE + rlang::is_named(data) is not TRUE # if `data` is not sda-like errors gracefully `data` must have all the expected names. - x Missing names: emission_factor_metric, emission_factor_value. + x Missing names: emission_factor_metric, emission_factor_value, label. i Is your data `sda`-like? Caused by error in `abort_if_missing_names()`: ! `data` must have all the expected names. - x Missing names: emission_factor_metric, emission_factor_value. + x Missing names: emission_factor_metric, emission_factor_value, label. # if `data` has zero rows errors gracefully - `zero_row` must have some rows. - x `zero_row` has zero rows. + `data` must have all the expected names. + x Missing names: label. + i Is your data `sda`-like? + Caused by error in `abort_if_missing_names()`: + ! `data` must have all the expected names. + x Missing names: label. # with too many sectors errors gracefully - `data` must have a single value of `sector`. - i Do you need to pick one value? E.g. pick 'a' with: `subset(data, sector == 'a')`. - x Provided: a, b. + `data` must have all the expected names. + x Missing names: label. + i Is your data `sda`-like? + Caused by error in `abort_if_missing_names()`: + ! `data` must have all the expected names. + x Missing names: label. # with too many lines to plot errors gracefully