0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/packages/middleware/test/utils.spec.ts

14 lines
430 B
TypeScript
Raw Normal View History

import { validatePrimaryColor } from '../src/middlewares/web/utils/web-utils';
2020-03-03 17:59:19 -05:00
describe('Utilities', () => {
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
});