Skip to content

Commit

Permalink
Add test infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Jul 16, 2024
1 parent 41f333f commit cef1540
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Imports:
Depends:
R (>= 2.10)
LazyData: true
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
12 changes: 12 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
# * https://testthat.r-lib.org/articles/special-files.html

library(testthat)
library(AAGIPalettes)

test_check("AAGIPalettes")
3 changes: 3 additions & 0 deletions tests/testthat/test-test-colours_as_hex.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test_that("colours_as_hex returns proper hex values", {
expect_equal(colour_as_hex(name = "AAGI Black"), "#414042")
})

0 comments on commit cef1540

Please sign in to comment.