to be colored

  • <string> [not] to be colored <oneColor|string>

Passes if the subject and the argument are parsable as color strings and represent the same color.

expect('#f00', 'to be colored', 'red');

In case of a failing expectation you get the following output:

expect('rgb(0, 100, 32)', 'to be colored', 'yellow');
expected 'rgb(0, 100, 32)' to be colored 'yellow'
 
#006420
#ffff00
expect('red', 'not to be colored', 'yellow');