Make processColor more efficient

Reviewed By: @nicklockwood, @vjeux

Differential Revision: D2507684
This commit is contained in:
Pieter De Baets
2015-10-05 10:08:10 -07:00
committed by facebook-github-bot-7
parent 787895e903
commit babdeb33ba
3 changed files with 18 additions and 40 deletions

View File

@@ -91,13 +91,13 @@ describe('processColor', () => {
describe('HSL strings', () => {
it('should convert hsl(x, y%, z%)', () => {
it('should convert hsla(x, y%, z%, a)', () => {
var colorFromString = processColor('hsla(318, 69%, 55%, 0.25)');
var expectedInt = 0x40DB3DAC;
expect(colorFromString).toEqual(expectedInt);
});
it('should convert hsl x, y%, z%', () => {
it('should convert hsla x, y%, z%, a', () => {
var colorFromString = processColor('hsla 318, 69%, 55%, 0.25');
var expectedInt = 0x40DB3DAC;
expect(colorFromString).toEqual(expectedInt);