mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
#test-coverage-for-getColorNameAndShadeFromColor function
This commit is contained in:
parent
952aa63f86
commit
09426e3aac
1 changed files with 17 additions and 0 deletions
17
src/components/ColorPicker/colorPicker.test.ts
Normal file
17
src/components/ColorPicker/colorPicker.test.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { ColorPaletteCustom } from '../../colors';
|
||||
import { getColorNameAndShadeFromColor } from './colorPickerUtils';
|
||||
|
||||
test('getColorNameAndShadeFromColor returns null when no matching color is found', () => {
|
||||
// Arrange
|
||||
const palette: ColorPaletteCustom = {
|
||||
green: '#00FF00',
|
||||
orange: '#E07C24',
|
||||
};
|
||||
const color = '#FF6666';
|
||||
|
||||
// Act
|
||||
const result = getColorNameAndShadeFromColor({ palette, color });
|
||||
|
||||
// Assert
|
||||
expect(result).toBeNull();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue