mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Make processColor more efficient
Reviewed By: @nicklockwood, @vjeux Differential Revision: D2507684
This commit is contained in:
committed by
facebook-github-bot-7
parent
787895e903
commit
babdeb33ba
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user