tests/testthat/test_emissions_factors.R

context("Emissions factors")

test_that("Emissions factors with hydro", {
  ef <- emissions_factors(collapse_renewables = FALSE)
  expect_setequal(ef$fuel, c("Coal", "Oil", "Natural Gas", "Nuclear",
                             "Hydro", "Renewables"))
})

test_that("Emissions factors without hydro", {
  ef <- emissions_factors(collapse_renewables = TRUE)
  expect_setequal(ef$fuel, c("Coal", "Oil", "Natural Gas", "Nuclear",
                             "Renewables"))
})
jonathan-g/kayadata documentation built on July 16, 2024, 9:04 p.m.