0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-13 22:48:31 -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 23:59:19 +01: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 23:59:19 +01:00
});