Skip to content

Commit f3265c6

Browse files
committed
Add tests for info_flags, info_icons, and info_unit_conversions
1 parent 50e5014 commit f3265c6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/testthat/test-info_tables.R

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,30 @@ test_that("info_google_fonts() works correctly", {
8585
c(38, 4)
8686
)
8787
})
88+
89+
test_that("info_flags() works correctly", {
90+
91+
# Expect that `info_flags()` is a gt table
92+
expect_s3_class(info_flags(), c("gt_tbl", "data.frame"))
93+
94+
# Expect that the function doesn't error
95+
expect_no_error(info_flags())
96+
})
97+
98+
test_that("info_icons() works correctly", {
99+
100+
# Expect that `info_icons()` is a gt table
101+
expect_s3_class(info_icons(), c("gt_tbl", "data.frame"))
102+
103+
# Expect that the function doesn't error
104+
expect_no_error(info_icons())
105+
})
106+
107+
test_that("info_unit_conversions() works correctly", {
108+
109+
# Expect that `info_unit_conversions()` is a gt table
110+
expect_s3_class(info_unit_conversions(), c("gt_tbl", "data.frame"))
111+
112+
# Expect that the function doesn't error
113+
expect_no_error(info_unit_conversions())
114+
})

0 commit comments

Comments
 (0)