|
1 | | -import {hexToRGb, rgbToHex, rgbToHsv, hsvToRgb} from '../../src/p4/color-utils'; |
| 1 | +import {hexToRgb, rgbToHex, rgbToHsv, hsvToRgb} from '../../src/p4/color-utils'; |
2 | 2 |
|
3 | | -test('hexToRGb', () => { |
4 | | - expect(hexToRGb('#000000')).toEqual([0, 0, 0]); |
5 | | - expect(hexToRGb('#fffFFf')).toEqual([255, 255, 255]); |
6 | | - expect(hexToRGb('#abcdef')).toEqual([0xab, 0xcd, 0xef]); |
7 | | - expect(hexToRGb('abcdef')).toEqual([0xab, 0xcd, 0xef]); |
8 | | - expect(hexToRGb(' abcdef ')).toEqual([0xab, 0xcd, 0xef]); |
9 | | - expect(hexToRGb('#fff')).toEqual([255, 255, 255]); |
10 | | - expect(hexToRGb('abc')).toEqual([0xaa, 0xbb, 0xcc]); |
| 3 | +test('hexToRgb', () => { |
| 4 | + expect(hexToRgb('#000000')).toEqual([0, 0, 0]); |
| 5 | + expect(hexToRgb('#fffFFf')).toEqual([255, 255, 255]); |
| 6 | + expect(hexToRgb('#abcdef')).toEqual([0xab, 0xcd, 0xef]); |
| 7 | + expect(hexToRgb('abcdef')).toEqual([0xab, 0xcd, 0xef]); |
| 8 | + expect(hexToRgb(' abcdef ')).toEqual([0xab, 0xcd, 0xef]); |
| 9 | + expect(hexToRgb('#fff')).toEqual([255, 255, 255]); |
| 10 | + expect(hexToRgb('abc')).toEqual([0xaa, 0xbb, 0xcc]); |
11 | 11 | }); |
12 | 12 |
|
13 | 13 | test('rgbToHex', () => { |
|
0 commit comments