mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
99a1af1c35
* migrate storage package * migrate middleware package * migrate auth-memory plugin
15 lines
480 B
TypeScript
15 lines
480 B
TypeScript
import { describe, expect, test } from 'vitest';
|
|
|
|
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();
|
|
});
|
|
});
|
|
});
|