2024-09-29 09:03:29 -05:00
|
|
|
import { describe, expect, test } from 'vitest';
|
|
|
|
|
2023-02-12 14:26:18 -05:00
|
|
|
import { validatePrimaryColor } from '../src/middlewares/web/utils/web-utils';
|
2020-11-15 05:14:09 -05:00
|
|
|
|
2020-03-03 17:59:19 -05:00
|
|
|
describe('Utilities', () => {
|
2022-06-24 15:09:46 -05:00
|
|
|
describe('validatePrimaryColor', () => {
|
|
|
|
test('is valid', () => {
|
|
|
|
expect(validatePrimaryColor('#222222')).toEqual('#222222');
|
|
|
|
expect(validatePrimaryColor('#222fff')).toEqual('#222fff');
|
|
|
|
});
|
|
|
|
test('is invalid', () => {
|
|
|
|
expect(validatePrimaryColor('fff')).toBeUndefined();
|
|
|
|
});
|
|
|
|
});
|
2020-03-03 17:59:19 -05:00
|
|
|
});
|