mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
This commit is contained in:
parent
3f31cf38b8
commit
e463fa0670
11 changed files with 365 additions and 133 deletions
15
tests/testthat/test-contrast_text.R
Normal file
15
tests/testthat/test-contrast_text.R
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
test_that("Contrasting works", {
|
||||
colors <- c("#F2F2F2", "blue","red","black","white","gray35")
|
||||
|
||||
expect_snapshot(
|
||||
contrast_text(colors)
|
||||
)
|
||||
|
||||
expect_snapshot(
|
||||
contrast_text(colors,light_text = "blue",dark_text = "grey10", method = "relative", threshold = .1)
|
||||
)
|
||||
|
||||
expect_snapshot(
|
||||
contrast_text(colors,light_text = "blue",dark_text = "grey10", method = "perceived", threshold = .7)
|
||||
)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue