2024-09-29 16:03:29 +02:00
|
|
|
import { describe, expect, test } from 'vitest';
|
|
|
|
|
2023-02-12 20:26:18 +01:00
|
|
|
import { validatePrimaryColor } from '../src/middlewares/web/utils/web-utils';
|
2020-11-15 11:14:09 +01:00
|
|
|
|
2020-03-03 23:59:19 +01:00
|
|
|
describe('Utilities', () => {
|
2022-06-24 22:09:46 +02: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 23:59:19 +01:00
|
|
|
});
|