1

I wrote a unit-test for an angular JS directive, and everything seemed fine, except a particular error, that was caused by me using a HEX notation, and the browser converting in to rgb notation.

Error: Expected 'rgb(238, 238, 238)' to equal '#EEEEEE'. You may notice that the above RGB and HEX expression stand for the same color precisely, and the difference.

So my question is: Can I use rgb notation, and assume that it will be testable on all the browsers, or do I need to manually detect the notation type, and convert one of the colors to match the notation of the other one manually

I also found this git-hub issue.

4

0 回答 0