0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/packages/middleware/test/utils.spec.ts
Juan Picado 45c03819e2
refactor: html render middleware improvements (#3603)
* refactor: render middleware

* refactor: render middleware
2023-02-12 20:26:18 +01:00

13 lines
430 B
TypeScript

import { validatePrimaryColor } from '../src/middlewares/web/utils/web-utils';
describe('Utilities', () => {
describe('validatePrimaryColor', () => {
test('is valid', () => {
expect(validatePrimaryColor('#222222')).toEqual('#222222');
expect(validatePrimaryColor('#222fff')).toEqual('#222fff');
});
test('is invalid', () => {
expect(validatePrimaryColor('fff')).toBeUndefined();
});
});
});