|
|
|
|
|
|
|
|
|
|
|
|
|
|
it("requires valid CSS names", { |
|
|
it("requires valid CSS names", { |
|
|
expect_error(prepare_colors(c("light blue" = "#88f"))) |
|
|
expect_error(prepare_colors(c("light blue" = "#88f"))) |
|
|
expect_error(preapre_colors(c("light/blue" = "#88f"))) |
|
|
|
|
|
|
|
|
expect_error(prepare_colors(c("light/blue" = "#88f"))) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
it("returns list with color_name and value for each color", { |
|
|
it("returns list with color_name and value for each color", { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it("errors if not a hex color", { |
|
|
it("errors if not a hex color", { |
|
|
expect_error(full_length_hex("123abc")) |
|
|
expect_error(full_length_hex("123abc")) |
|
|
|
|
|
expect_error(full_length_hex("#1234567")) |
|
|
|
|
|
expect_error(full_length_hex("#00000Z")) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |