UNPKG

simple-color-functions

Version:
17 lines (13 loc) 435 B
import { isRgb } from '../lib/isRgb'; it('should return true for rgb values', () => { const actual = isRgb('255, 192, 2'); expect(actual).toEqual(true); }); it('should return false if no valid rgb values', () => { const actual = isRgb('255, 192, 289'); expect(actual).toEqual(false); }); it('should return false for hex|hsl value', () => { const actual = isRgb('#88aa34'); expect(actual).toEqual(false); });