Skip to content

Commit

Permalink
adding test coverage badge, more coverage on ebase_prep
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Mar 28, 2022
1 parent 11704c6 commit cde954d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<!-- badges: start -->
[![R-CMD-check](https://github.com/fawda123/EBASE/workflows/R-CMD-check/badge.svg)](https://github.com/fawda123/EBASE/actions)
[![codecov](https://codecov.io/gh/fawda123/EBASE/branch/main/graph/badge.svg?token=45Y7PDEHXA)](https://codecov.io/gh/fawda123/EBASE)
<!-- badges: end -->

This an R package for Estuarine Bayesian Single-station Estimation method for ecosystem metabolism.
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-ebase.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test_that("Checking ebase names", {
dat <- exdat %>%
filter(month(exdat$DateTimeStamp) == 6 & day(exdat$DateTimeStamp) %in% 1:2)

result <- ebase(dat, interval = 900, H = 1.85, progress = FALSE, n.chains = 2) %>%
result <- ebase(dat, interval = 900, H = 1.85, progress = TRUE, n.chains = 2) %>%
names

expect_equal(result, c("Date", "DO_obs", "DO_mod", "DateTimeStamp", "dDO", "a", "b",
Expand Down
6 changes: 6 additions & 0 deletions tests/testthat/test-ebase_prep.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ test_that("Checking ebase_prep names", {
expect_equal(result, c("Date", "DateTimeStamp", "DO_obs", "DO_sat", "H", "Temp", "Sal",
"PAR", "WSpd", "sc"))
})

test_that("Checking ebase_prep incorrect input", {

expect_error(ebase_prep(exdat[,-5], H = 1.85))

})

0 comments on commit cde954d

Please sign in to comment.