diff --git a/src/components/ColorPicker/colorPicker.test.ts b/src/components/ColorPicker/colorPicker.test.ts new file mode 100644 index 000000000..735477c9c --- /dev/null +++ b/src/components/ColorPicker/colorPicker.test.ts @@ -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(); +}); \ No newline at end of file