Files
Nexumi/apps/webui/src/lib/utils.test.ts
smueller 04e04eb11d Update fun module configuration and enhance CSS styles
- Added 'enabled' property to FunConfigSchema with a default value of true for better configuration management.
- Refactored getFunConfig to return a complete default configuration when no data is found.
- Improved globals.css by expanding CSS variables for light and dark themes, enhancing styling consistency across the application.
2026-07-22 13:56:33 +02:00

17 lines
477 B
TypeScript

import { describe, expect, it } from 'vitest';
import { cn } from './utils';
describe('cn', () => {
it('merges class names', () => {
expect(cn('flex', 'items-center')).toBe('flex items-center');
});
it('resolves conflicting tailwind classes in favor of the last one', () => {
expect(cn('px-2', 'px-4')).toBe('px-4');
});
it('drops falsy values', () => {
expect(cn('base', false && 'hidden', undefined, null, 'visible')).toBe('base visible');
});
});